From e521f6e6b05128bdbcec6b27515135935dfd4c0f Mon Sep 17 00:00:00 2001 From: Athos Ribeiro Date: Thu, 19 Mar 2015 10:55:59 -0300 Subject: [PATCH] Pass user to not if --- cookbooks/noosfero/recipes/default.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cookbooks/noosfero/recipes/default.rb b/cookbooks/noosfero/recipes/default.rb index 445f942..47d8ede 100644 --- a/cookbooks/noosfero/recipes/default.rb +++ b/cookbooks/noosfero/recipes/default.rb @@ -19,10 +19,7 @@ execute 'noosfero:schema' do command "RAILS_ENV=production bundle exec rake db:schema:load && RAILS_ENV=production NOOSFERO_DOMAIN=#{node['config']['external_hostname']} bundle exec rake db:data:minimal" cwd '/usr/lib/noosfero' user 'noosfero' - not_if do - # if the profiles table already exists, the schema was already loaded - system("psql -h database -U noosfero --no-align --tuples-only -q -c 'select count(*) from profiles'") - end + not_if "psql -h database -U noosfero --no-align --tuples-only -q -c 'select count(*) from profiles'", :user => 'noosfero' notifies :restart, 'service[noosfero]' end -- libgit2 0.21.2