Normally I'd add my loop at the end of each task but my playbook is growing
rather long. How do I set variables in the playbook so that each task will
loop though them ? Something like this
- name: archive logs
hosts: localhost
vars:
date: "{{ lookup('pipe', 'date -d \"-1 month\" +\"%m-%Y\"') }}"
loop:
- { customer: 'customer1', archive: 'customer1.tgz', bucket:
'customer1-log-archive' }
- { customer: 'customer2', archive: 'customer2.tgz', bucket:
'customer2-log-archive' }
--
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/9d28bd7f-b856-4c04-8cda-a314fd6e8a17%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.