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

**URL:** <https://forum.ansible.com/t/why-ansible-skips-hosts-even-after-using-add-host-module-in-bootstrapping-ec2-instances/19456>\
**Category:** Ansible Project\
**Created:** [October 7, 2015, 1:17pm UTC](https://forum.ansible.com/t/why-ansible-skips-hosts-even-after-using-add-host-module-in-bootstrapping-ec2-instances/19456 "2015-10-07T13:17:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Diwaakartg\_Ganesh](https://avatars.discourse-cdn.com/v4/letter/d/49beb7/32.png) [@Diwaakartg\_Ganesh](https://forum.ansible.com/u/Diwaakartg_Ganesh)\
**Post date:** [October 7, 2015, 1:17pm UTC](https://forum.ansible.com/t/why-ansible-skips-hosts-even-after-using-add-host-module-in-bootstrapping-ec2-instances/19456/1 "2015-10-07T13:17:28Z")

</div>

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,

```auto
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

```

---

<div class="post-metadata">

**Author:** ![Vikas\_Kumar](https://avatars.discourse-cdn.com/v4/letter/v/ecb155/32.png) [@Vikas\_Kumar](https://forum.ansible.com/u/Vikas_Kumar)\
**Post date:** [October 7, 2015, 1:27pm UTC](https://forum.ansible.com/t/why-ansible-skips-hosts-even-after-using-add-host-module-in-bootstrapping-ec2-instances/19456/2 "2015-10-07T13:27:54Z")

</div>

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
