Created
January 28, 2013 01:26
-
-
Save house9/4652008 to your computer and use it in GitHub Desktop.
Add jenkins user to postgres as super user
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
execute "usermod jenkins -aG postgres" do | |
not_if "groups jenkins | grep postgres" | |
end | |
execute "createuser jenkins --superuser --no-password" do | |
user "postgres" | |
group "postgres" | |
cwd "/var/lib/postgresql" | |
not_if "psql postgres -tAc \"SELECT 1 FROM pg_roles WHERE rolname='jenkins'\" | grep 1", | |
:cwd => "/var/lib/postgresql", | |
:user => "postgres", | |
:group => "postgres" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment