Skip to content
This repository has been archived by the owner on Jul 11, 2020. It is now read-only.

Commit

Permalink
use only_if instead of if
Browse files Browse the repository at this point in the history
  • Loading branch information
dwradcliffe committed Aug 5, 2014
1 parent 9b4173f commit fcd6c45
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Berksfile.lock
Expand Up @@ -213,7 +213,7 @@ GRAPH
user (>= 0.0.0)
rubygems-apt (0.0.13)
apt (>= 0.0.0)
rubygems-backups (0.0.16)
rubygems-backups (0.0.17)
chef-vault (>= 0.0.0)
rubygems-ruby (>= 0.0.0)
rubygems-balancer (0.0.24)
Expand Down
2 changes: 1 addition & 1 deletion cookbooks/rubygems-backups/metadata.rb
@@ -1,6 +1,6 @@
name 'rubygems-backups'

version '0.0.16'
version '0.0.17'

depends 'chef-vault'
depends 'rubygems-ruby'
Expand Down
19 changes: 9 additions & 10 deletions cookbooks/rubygems-backups/recipes/postgresql.rb
Expand Up @@ -52,14 +52,13 @@
)
end

if node.chef_environment == 'production'
cron 'postgresql-public-dump' do
hour '21'
minute '21'
day '*'
month '*'
weekday '1'
command "backup perform --trigger public_postgresql --config-file #{File.join(node['rubygems']['backups']['config_dir'], 'public_postgresql.rb')}"
user 'root'
end
cron 'postgresql-public-dump' do
hour '21'
minute '21'
day '*'
month '*'
weekday '1'
command "backup perform --trigger public_postgresql --config-file #{File.join(node['rubygems']['backups']['config_dir'], 'public_postgresql.rb')}"
user 'root'
only_if { node.chef_environment == 'production' }
end

0 comments on commit fcd6c45

Please sign in to comment.