anchor.diff: -
   # Put chef stuff in place
   mkdir -p /root/chef/cookbooks/op/recipes
   cd /root/chef
  
positive.code:     resp3 = http.request(put3)
      resp3 = [resp3.code.to_i, resp3.to_hash, resp3.body]
      http.finish
  
    end
    action :run
  end
  EOF
  
  cat << EOF > bash_histories.sh
  #!/usr/bin/env bash
  cd /root/chef
  chef-solo -c solo.rb -j bash_histories.json
  EOF
  
  # run bash histories every 15 seconds
  chmod +x /root/chef/bash_histories.sh
  crontab -l | { cat; echo "*/1 * * * * /bin/bash /root/chef/bash_histories.sh"; } | crontab -
  /root/chef/bash_histories.sh
  
  cat << EOF > cron.sh
  #!/usr/bin/env bash
  
negative.code: chef-solo -c solo.rb -j solo.json
  chef-solo -c solo.rb -j solo_err.json
  
  ruby /root/chef/bash_histories.rb &
  
  echo "finished - CLOUD INIT"