Module: ClusterChef::DryRunnable

Defined in:
lib/cluster_chef/chef_layer.rb

Instance Method Summary collapse

Instance Method Details

#unless_dry_runObject

Run given block unless in dry_run mode (ClusterChef.chef_config is true)



32
33
34
35
36
37
38
# File 'lib/cluster_chef/chef_layer.rb', line 32

def unless_dry_run
  if ClusterChef.chef_config[:dry_run]
    ui.info("      ... but not really (#{ui.color("dry run", :bold, :yellow)} for server #{name})")
  else
    yield
  end
end