Re: [ansible-project] Execute task in a playbook only once per day ?

2014-06-13 Thread Azul
sorted, + 15 - name: check when we last downloaded from upstream + 14 command: find /var/tmp/ -atime 1 -name last-upstream-fetch + 13 register: result + 12 ignore_errors: true + 11 10 - include: sync-upstream-repositories.yaml + 9 when: result !=

Re: [ansible-project] Execute task in a playbook only once per day ?

2014-06-13 Thread Michael DeHaan
You could modify a file with a result when you run a step and use the 'stat' module to check the mtime of the file. On Fri, Jun 13, 2014 at 5:15 AM, Azul m...@azulinho.com wrote: sorted, + 15 - name: check when we last downloaded from upstream + 14 command: find /var/tmp/ -atime 1

[ansible-project] Execute task in a playbook only once per day ?

2014-06-12 Thread Azul Inho
Hi there, I saw an example sometime ago, either a thread,blog or IRC about executing a single task in a playbook only once every 24 hours. Can't find that example anywhere, has anyone here has an example of how to achieve this ? I have a task that syncs a mirror with a bunch of upstream repos,