--- - name: Create Instances hosts: 127.0.0.1 connection: local gather_facts: false vars_files: - "../vars/test.yml" tasks: #- include: ../tasks/create-security-groups.yml - include: ../tasks/create-server-groups.yml - include: ../tasks/create-instances.yml #- include: ../tasks/create-volumes.yml - shell: "> ../hosts-test" - shell: "../utils/inventory.py ../hosts-test {{ item }} {% for host in groups[item] %}{{ host }},{{ hostvars[host]['host_name'] }} {% endfor %}" when: item not in ['all', 'ungrouped'] with_items: "{{ groups.keys() }}"