]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/postgresql/providers/user.rb
More rubocop cleanup
[chef.git] / cookbooks / postgresql / providers / user.rb
index 11c783e22264f1b132dae4b1c8ec7ce0c1d41df1..79136825528c9617fdd6732c15e9046475c5419b 100644 (file)
@@ -39,7 +39,7 @@ action :create do
   createrole = new_resource.createrole ? "CREATEROLE" : "NOCREATEROLE"
   replication = new_resource.replication ? "REPLICATION" : "NOREPLICATION"
 
   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
     @pg.execute(:command => "CREATE ROLE \"#{new_resource.user}\" LOGIN #{password} #{superuser} #{createdb} #{createrole}")
     new_resource.updated_by_last_action(true)
   else