anchor.diff:  echo $PUPPET_PID > /var/log/$TAG/puppet.pid
   sleep 5
   
  -wget "https://$MERLIN_API_ENDPOINT/instance/$ID/sign_key&access_token=$ACCESS_TOKEN" -O /var/log/$TAG/signkey.log
  +wget "https://$MERLIN_API_ENDPOINT/api/i/$ID/sign_key&access_token=$ACCESS_TOKEN" -O /var/log/$TAG/signkey.log
   
   # We will wait a maximum of ten minutes for puppet to finish, then we assume
   # something is amiss
  
positive.code: 
  if [ -d "proc/$PUPPET_PID" ];
  then
      wget "https://$MERLIN_API_ENDPOINT/instance/$ID/intervene&access_token=$ACCESS_TOKEN&condition=puppetlongrunning" 
  else
      wget "https://$MERLIN_API_ENDPOINT/instance/$ID/complete&access_token=$ACCESS_TOKEN"
  fi
  
  echo "Provisioning complete!"
  
negative.code: #
  
  HOSTNAME='<%= hostname %>'
  MERLIN_API_ENDPOINT='https://merlin.tld/'
  ACCESS_TOKEN='<%= access_token %>'
  INSTANCE_ID='<%= instance_id %>'
  
  