# Ansible 2.0.2.0 + shade 1.8.0 + openstack : Update inventory  not working

**URL:** <https://forum.ansible.com/t/ansible-2-0-2-0-shade-1-8-0-openstack-update-inventory-not-working/21375>\
**Category:** Ansible Project\
**Created:** [May 6, 2016, 7:15pm UTC](https://forum.ansible.com/t/ansible-2-0-2-0-shade-1-8-0-openstack-update-inventory-not-working/21375 "2016-05-06T19:15:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![t10tennn](https://avatars.discourse-cdn.com/v4/letter/t/f475e1/32.png) [@t10tennn](https://forum.ansible.com/u/t10tennn)\
**Post date:** [May 6, 2016, 7:15pm UTC](https://forum.ansible.com/t/ansible-2-0-2-0-shade-1-8-0-openstack-update-inventory-not-working/21375/1 "2016-05-06T19:15:12Z")

</div>

Hi,

I 'm an ansible newbie , I’m following lars blog to get ansible play nice with openstack

> **[Ansible 2.0: New OpenStack modules](https://blog.oddbit.com/2015/10/26/ansible-20-new-openstack-modules/)**
>
> This is the second in a loose sequence of articles looking at new features in Ansible 2.0. In the previous article I looked at the Docker connection driver. In this article, I would like to provide an overview of the new-and-much-improved suite of...

I have a strange issue Issue.  
I can launch instances on openstack. But I’m unable to update the inventory.

playbook:  
–snip–

- hosts: localhost  
connection: local  
roles:
- osp  
–snip–

osp roles: main.yml

–snip–

- name: create a nova instance  
os\_server:  
cloud: osp\_test  
name: test  
state: present  
network: osp\_50  
timeout: 200  
wait: yes  
image: centos-72u12151  
flavor: m1.xlarge  
key\_name: vagrant\_key  
floating\_ip\_pools:

- ext\_net  
security\_groups:

- default  
meta:  
group: openstack  
register: mysrv\_inst

- name: Add osp instances back to inventory  
add\_host:  
name: “{{ mysrv\_inst.openstack.public\_v4 }}”  
groups: openstack  
ansible\_host: “{{ mysrv\_inst.openstack.public\_v4 }}”  
ansible\_user: centos  
ansible\_become: true

–snip–

# I dont get any error message ..

–snip–  
ansible-playbook osp.yml -v  
Using /home/centos/ansible/ansible.cfg as config file

PLAY \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

TASK [setup] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
ok: [127.0.0.1]

TASK [osp : include] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
included: /home/centos/ansible/roles/osp/tasks/main.yml for 127.0.0.1

TASK [osp : create a nova instance] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
changed:  
.  
.  
TASK [osp : Add osp instances back to inventory] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
changed: [127.0.0.1] =\> {“add\_host”: {“groups”: [“openstack”], “host\_name”: “172.16.202.193”, “host\_vars”: {“ansible\_become”: true, “ansible\_host”: “172.16.202.193”, “ansible\_user”: “centos”}}, “changed”: true}

PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
127.0.0.1 : ok=4 changed=2 unreachable=0 failed=0

–snip–

Am i missing some steps …
