Brian Can you elaborate please? Im relatively new to using Ansible so not sure where the with_items should be placed? Does this go into playbook or task YAML file within role?
My playbook is very simple and looks like this currently my inventory file is underneath. [vagrant@dev4 RTR-TEMPLATE]$ more site.yml --- - name: Generate router configuration files hosts: router connection: local gather_facts: no roles: - router [vagrant@dev4 RTR-TEMPLATE]$ more test [router] tor01.a01 tor01.a02 [vagrant@dev4 RTR-TEMPLATE]$ my structure currently looks like this [vagrant@dev4 ANSIBLE]$ tree RTR-TEMPLATE/ RTR-TEMPLATE/ ├── host_vars │ ├── tor01.a01.yml │ ├── tor01.a02.yml │ └── tor_switches.yml ├── roles │ └── router │ ├── tasks │ │ └── main.yml │ ├── templates │ │ ├── base.j2 │ │ ├── router-1921.j2 │ │ └── router-881.j2 │ └── vars ├── site.yml └── test 6 directories, 9 files On Thursday, 4 December 2014 22:31:21 UTC, Brian Coca wrote: > > You can use inventory groups as lists to iterate over > > - debug: > with_items: groups ['cisco_switches' > -- 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/0dcfb6a5-280a-4fd9-9d5b-3b317f1fb313%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
