Here's the create task:
- hosts: ec2_instances
4 connection: local
5 gather_facts: true
6 tasks:
7 - name: Launch Instance
8 ec2:
9 group_id: "{{ hostvars[inventory_hostname].group_id }}"
10 instance_type: 't2.micro'
11 image: "{{ hostvars[inventory_hostname].image }}"
12 wait: true
13 region: 'us-east-1'
14 keypair: "{{ key_pair }}"
15 vpc_subnet_id: "{{ subnet }}"
16 instance_tags: "{{ hostvars[inventory_hostname].tags }}"
17 register: ec2_info
but why does that module not loop through ec2.instances like the others
do? Also there are examples online that do i that way of using the
add_hosts mod with {var}.instances.
--
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/ea194701-0487-48e1-b0d6-45f8d11f80c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.