X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/faf8ae12e85eabb050b0f5eceb2cb67ad1de5261..b6672a3c74491a56333974303e1cbd7deb9ddb7c:/cookbooks/postgresql/providers/user.rb?ds=sidebyside diff --git a/cookbooks/postgresql/providers/user.rb b/cookbooks/postgresql/providers/user.rb index 11c783e22..791368255 100644 --- a/cookbooks/postgresql/providers/user.rb +++ b/cookbooks/postgresql/providers/user.rb @@ -39,7 +39,7 @@ action :create do createrole = new_resource.createrole ? "CREATEROLE" : "NOCREATEROLE" replication = new_resource.replication ? "REPLICATION" : "NOREPLICATION" - unless @pg.users.include?(new_resource.user) + if !@pg.users.include?(new_resource.user) @pg.execute(:command => "CREATE ROLE \"#{new_resource.user}\" LOGIN #{password} #{superuser} #{createdb} #{createrole}") new_resource.updated_by_last_action(true) else