title: How to delay entire chef recipe
body: <p>Is there anyway I can delay the entire chef recipe running in AWS OpsWorks? </p>
  
  <p>I was trying to execute a sleep command but no success:</p>
  
  <pre><code>Chef::Log.info("Delaying chef execution")
  execute 'delay' do
    command 'sleep 60'
  end
  </code></pre>
  
  <p>What I want to achieve is to delay all the Ruby code in a recipe based on where I make the delay, could be on top, could be in the middle.</p>
  
  <p>EDIT: Complete Chef recipe:</p>
  
  <pre><code>Chef::Log.info("stopping service rsyslog")
  service 'rsyslog' do
    action :stop
  end
  Chef::Log.info("configuring private ip addresses for mesos_master templates")
  ruby_block "configuring_mesos_master_templates" do
      # Do stuff
  end
  Chef::Log.info("starting service rsyslog")
  service 'rsyslog' do
    action :start
  end
  Chef::Log.info("restarting service zookeeper")
  service 'zookeeper' do
      action :restart
  end
  Chef::Log.info("restarting service mesos-master")
  service 'mesos-master' do
      provider Chef::Provider::Service::Upstart
      action :restart
  end
  Chef::Log.info("starting service marathon")
  service 'marathon' do
      action :start
  end
  </code></pre>