title: Ansible: setup a cron job on one host
body: <p>I'm deploying a 2-hosts service that also needs to setup a cron job. This job should only be run on one of the two machines (I dont care which). what's the easiest way to do so? </p>
  
  <ul>
  <li>I know that the shell module in Ansible supports "run_once", but the cron module does not.</li>
  <li>I could setup the cron job on both machines and then use the command "crontab -r" to remove all the jobs (provided no other jobs are needed there) on one machine. this is dirty, but very easy.</li>
  </ul>
  
  <p>any better ideas?</p>