# Host Group not being recognised

**URL:** <https://forum.ansible.com/t/host-group-not-being-recognised/18048>\
**Category:** Ansible Project\
**Created:** [April 22, 2015, 8:27am UTC](https://forum.ansible.com/t/host-group-not-being-recognised/18048 "2015-04-22T08:27:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Antonpm11](https://avatars.discourse-cdn.com/v4/letter/a/c77e96/32.png) [@Antonpm11](https://forum.ansible.com/u/Antonpm11)\
**Post date:** [April 22, 2015, 8:27am UTC](https://forum.ansible.com/t/host-group-not-being-recognised/18048/1 "2015-04-22T08:27:39Z")

</div>

Hi,

I recently upgraded to 1.9 and I’ve noticed a host group I created is not being recognised. Here is the playbook extract:

tasks:

- name: Provision test t2 micro instance  
ec2:  
aws\_access\_key: “{{ ec2\_access\_key }}”  
aws\_secret\_key: “{{ ec2\_secret\_key }}”  
region: “{{ region }}”  
key\_name: “{{ key\_name }}”  
instance\_type: “{{ instance\_type }}”  
image: “{{ image }}”  
wait: “{{ wait }}”  
wait\_timeout: “{{ wait\_timeout }}”  
group: “{{ group }}”  
instance\_tags:  
name: “{{ inventory\_hostname }}”  
tier: web  
env: prod  
assign\_public\_ip: yes  
vpc\_subnet\_id: “{{ vpc\_subnet\_id }}”  
register: ec2

- name: Add all instance public IPs to host group  
add\_host: hostname={{ item.public\_ip }} groups=new\_webservers  
with\_items: ec2.instances

- name: Wait for SSH to come up  
wait\_for: host={{ item.public\_dns\_name }} port=22 delay=60 timeout=320 state=started  
with\_items: ec2.instances

- hosts: new\_webservers  
tasks:

- name: configure and deploy the webservers  
yum: name={{ item }} state=present  
with\_items:

- httpd

- php

- python

- service: name=httpd state=started

I get:

PLAY [new\_webservers] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
skipping: no hosts matched

And therefore the last section is not run. This playbook was working ok under ansible-1.8.4 so I was wondering if it’s a bug?

I am running ansible-1.9.0.1 on Centos 6

Thanks,

Anton

---

<div class="post-metadata">

**Author:** ![Antonpm11](https://avatars.discourse-cdn.com/v4/letter/a/c77e96/32.png) [@Antonpm11](https://forum.ansible.com/u/Antonpm11)\
**Post date:** [April 23, 2015, 10:16pm UTC](https://forum.ansible.com/t/host-group-not-being-recognised/18048/2 "2015-04-23T22:16:48Z")

</div>

> Something is definitely not right here, I end up with the following if I remove the “–limit” clause I was applying:

[http://pastebin.com/9YFXGPY6](http://pastebin.com/9YFXGPY6)

This is a log entry for the same playbook prior to the upgrade:

[http://pastebin.com/ZYLYZtGV](http://pastebin.com/ZYLYZtGV)

Yum logs show I upgraded 2 days later.

Does anyone think this is a bug and is anyone else seeing this?

Thanks,

Anton

---

<div class="post-metadata">

**Author:** ![Antonpm11](https://avatars.discourse-cdn.com/v4/letter/a/c77e96/32.png) [@Antonpm11](https://forum.ansible.com/u/Antonpm11)\
**Post date:** [April 23, 2015, 11:15pm UTC](https://forum.ansible.com/t/host-group-not-being-recognised/18048/3 "2015-04-23T23:15:05Z")

</div>

I downgraded to ansible-1.8.4-1.el6.noarch and I see the same issue, so really confused now!
