X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/98cc5f14caf136d786fea344a4742735ca192da2..069e33163e0b09a7d647a98c2fde284a16a43b99:/cookbooks/postgresql/providers/user.rb 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