create postgresql extension with puppet
This snippet adds the extension cube
to the database template1
. It will only run, if this extension isn't installed already. Just replace with your desired database and extension and add it to your manifests! yeee!
exec { "/usr/bin/psql -d template1 -c 'CREATE EXTENSION cube;'":
user => "postgres",
unless => "/usr/bin/psql -d template1 -c '\\dx' | grep cube",
}
Written by Benjamin Knofe
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Puppet
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#