# Ansible import playbooks with openstack error

**URL:** <https://forum.ansible.com/t/ansible-import-playbooks-with-openstack-error/32017>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [January 21, 2020, 9:07am UTC](https://forum.ansible.com/t/ansible-import-playbooks-with-openstack-error/32017 "2020-01-21T09:07:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sv1](https://avatars.discourse-cdn.com/v4/letter/s/e99b99/32.png) [@sv1](https://forum.ansible.com/u/sv1)\
**Post date:** [January 21, 2020, 9:07am UTC](https://forum.ansible.com/t/ansible-import-playbooks-with-openstack-error/32017/1 "2020-01-21T09:07:22Z")

</div>

Hi Experts,

Im very new to ansible and trying to set a small project by executing the scripts.  
My anisble --version is 2.2.1.0

Python 2.7.12+  
and open stack version is v.3.0

I have a site.yaml file as below  
site.yaml

- import\_playbook: repodb.yaml
- import\_playbook: dsm.yaml

Im trying to execute the site.yaml as below

While i do this im getting below error. Please help as Im not sure how to proceed from this.

vagrant@ubuntu:~/deployments/dsm-prod$ sudo su -p -c “ansible-playbook -vvv -i hosts.py -u cloud-user ~/ansible-playbooks/playbooks/data-server-manager/site.yaml --ask-vault-pass”  
Using /home/vagrant/deployments/dsm-prod/ansible.cfg as config file  
Vault password:  
ERROR! ‘import\_playbook’ is not a valid attribute for a Play

The error appears to have been in ‘/home/vagrant/ansible-playbooks/playbooks/data-server-manager/site.yaml’: line 1, column 3, but may  
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

- import\_playbook: repodb.yaml  
^ here

Thanks

---

<div class="post-metadata">

**Author:** ![racke](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/racke/32/4767_2.png) [@racke](https://forum.ansible.com/u/racke)\
**Post date:** [January 21, 2020, 9:26am UTC](https://forum.ansible.com/t/ansible-import-playbooks-with-openstack-error/32017/2 "2020-01-21T09:26:39Z")

</div>

> Hi Experts,
> 
> Im very new to ansible and trying to set a small project by executing the scripts.  
> My anisble --version is 2.2.1.0  
> Python 2.7.12+  
> and open stack version is v.3.0
> 
> I have a site.yaml file as below  
> site.yaml  
> - import\_playbook: repodb.yaml  
> - import\_playbook: dsm.yaml
> 
> Im trying to execute the site.yaml as below
> 
> From the deployment folder:
> 
> ansible-playbook -i hosts.py -u cloud-user /path/to/playbook/site.yaml
> 
> While i do this im getting below error. Please help as Im not sure how to proceed from this.

Get the right structure for your site.yml - you can't just put tasks into it without hosts and tasks  
section.

[https://docs.ansible.com/ansible/latest/user\_guide/playbooks\_intro.html](https://docs.ansible.com/ansible/latest/user_guide/playbooks_intro.html)

Regards  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Racke

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [January 21, 2020, 10:53am UTC](https://forum.ansible.com/t/ansible-import-playbooks-with-openstack-error/32017/3 "2020-01-21T10:53:54Z")

</div>

That is an ancient ansible version and has been EOL for ages.  
Since you're just starting to use ansible, please make sure you start  
with a new version.

[https://docs.ansible.com/ansible/latest/installation\_guide/intro\_installation.html](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html)
