QuickFix: Can’t install puppetdb via puppet modules in AWS Linux

I was trying to install PuppetDB for my Puppet deployment using this guide.

And then when I ran puppet agent -t, my terminal was full of red error messages:

Notice: /Stage[main]/Postgresql::Initdb/Exec[postgresql_initdb]/returns: creating directory /var/lib/pgsql/data ... initdb: could not create directory "/var/lib/pgsql": Permission denied
Error: /usr/bin/initdb --encoding 'UTF8' --pgdata '/var/lib/pgsql/data' returned 1 instead of one of [0]
Error: /Stage[main]/Postgresql::Initdb/Exec[postgresql_initdb]/returns: change from notrun to 0 failed: /usr/bin/initdb --encoding 'UTF8' --pgdata '/var/lib/pgsql/data' returned 1 instead of one of [0]

My quick fix:
[root@-----]$ cd /var/lib/ && ln -s pgsql9/ pgsql

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s