Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added the not_if condition to the add user task.

  • Loading branch information...
commit ec1d9202cf8ffd985596f5926c01db2be95fdfab 1 parent 39a09bb
Ben Burkert authored March 19, 2009

Showing 1 changed file with 2 additions and 0 deletions. Show diff stats Hide diff stats

  1. 2  cookbooks/postgresql/recipes/default.rb
2  cookbooks/postgresql/recipes/default.rb
@@ -55,4 +55,6 @@
55 55
     su - postgres -c "createuser -S -D -R -l -i -E #{node[:owner_name]}"
56 56
     su - postgres -c "psql -c \\"ALTER USER #{node[:owner_name]} WITH ENCRYPTED PASSWORD '#{node[:owner_pass]}'\\""
57 57
   }
  58
+
  59
+  not_if "su - postgres -c \"psql -c\\\"SELECT * FROM pg_roles\\\"\" | grep #{node[:owner_name]}"
58 60
 end

0 notes on commit ec1d920

Please sign in to comment.
Something went wrong with that request. Please try again.