why ansible skips hosts even after using add-host module in bootstrapping EC2 instances

24 views
Skip to first unread message

Diwaakartg Ganesh

unread,
Oct 7, 2015, 9:17:28 AM10/7/15
to Ansible Project

ansible - 1.9.3

Dynamic inventory is used. bootstrapping an EC2 instance and adding the instance to host using add-host, but it skips the plays for the newly created hosts. But when running the play next time, it finds the host and starts executing. here is the snippet,

hosts: localhost
tasks:
  - name: something
    ec2: this module will create instances
  - name: adding hosts
    add host: name=(name of the new instance)
hosts: new host
tasks: 
  - something

the above is just an example .This is the scenario.

Vikas Kumar

unread,
Oct 7, 2015, 9:27:54 AM10/7/15
to Ansible Project
Hi Ganesh,

It would be easier to dig, if you can give a sample output as well of ansible-playbook -v /your/playbook

Regards,
Vikas
Reply all
Reply to author
Forward
0 new messages