Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- exec { 'create db urutau':
- user => "postgres",
- command => "/usr/bin/createdb -O urutau urutau",
- path => "/home/pet",
- unless => "/usr/bin/psql -lqt | /usr/bin/cut -d \| -f 1 | /bin/grep -qw urutau",
- require => Service["postgresql"],
- }
- exec { 'psql create user':
- user => "postgres",
- command => "/usr/bin/createuser urutau",
- path => "/home/pet",
- unless => "/usr/bin/psql postgres -tAc \"SELECT 1 FROM pg_roles WHERE rolname='urutau'\" | /bin/grep -q 1",
- require => Service["postgresql"],
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement