Hi list,
Is there a way to have a counter with the with_items loop ?
The idea would be to create several cron job not starting all at the same
time.
tasks:
- name: "Install some cron jobs"
cron: name="job {{ item }}" min="COUNTER??" hour="3" user=root
cron_file="myjobs" job="/path/to/some/script {{ item }}"
with_items: somelist
the result could look like so:
#Ansible: job item1
1 3 * * * root /path/to/some/script item1
#Ansible: job item2
2 3 * * * root /path/to/some/script item2
#Ansible: job item3
3 3 * * * root /path/to/some/script item3
any suggesstions ?
Many thanks,
Julien.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.