Troubleshooting Puppet PostgreSQL Locale Mismatches
I’ve been doing some work lately with VMware Hyperic Server and Puppet, and I’ve been having issues where the Puppet Labs PostgreSQL module refuses to create a PostgreSQL database for me. I try to call it with: class { ‘postgresql’: charset => ‘UTF8’, }-> class { ‘postgresql::server’: config_hash => { ‘listen_addresses’ => ‘127.0.0.1’, ‘manage_redhat_firewall’ => true, ‘postgres_password’ => ‘goatsaresupercool’, }, require => Mount[‘/var/lib/pgsql’], } postgresql::db { ‘HQ’: user => ‘hyperic’, password => ‘sheeparecooltoo’, require => Class[‘postgresql::server’], } …and it throws this error into Puppet’s output: Error: /usr/bin/initdb –encoding ‘UTF8’ –pgdata ‘/var/lib/pgsql/data’ returned 1 instead of one of [0] “No problem,” I said. Since Puppet is kind enough to give me the command it’s trying I switched to the postgres user …