Ansible import playbooks with openstack error

133 views
Skip to first unread message

sv

unread,
Jan 21, 2020, 4:07:22 AM1/21/20
to Ansible Project
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.

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

Stefan Hornburg (Racke)

unread,
Jan 21, 2020, 4:27:02 AM1/21/20
to ansible...@googlegroups.com
On 1/21/20 10:07 AM, sv wrote:
> 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

Regards
Racke

>
> 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
>
> --
> You received this message because you are subscribed to the Google Groups "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> ansible-proje...@googlegroups.com <mailto:ansible-proje...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/2771be90-5f57-444a-9577-e2c01b960d1b%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/2771be90-5f57-444a-9577-e2c01b960d1b%40googlegroups.com?utm_medium=email&utm_source=footer>.


--
Ecommerce and Linux consulting + Perl and web application programming.
Debian and Sympa administration. Provisioning with Ansible.

signature.asc

Dick Visser

unread,
Jan 21, 2020, 5:54:22 AM1/21/20
to ansible...@googlegroups.com
On Tue, 21 Jan 2020 at 10:07, sv <svclou...@gmail.com> wrote:
>
> 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

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


--
Dick Visser
Trust & Identity Service Operations Manager
GÉANT
Reply all
Reply to author
Forward
0 new messages