On 14.02.2018 00:30, John Harmon wrote:
I don't know if I have a syntax issue or a bug. Thought before filing a bug I would see what you guys thought. I have a bunch of roles/playbooks I
wish to execute against new servers.  Here is what I have come up with.
ansible-2.4.3.0-1.el7.ans.noarch


Playbook:
---
- hosts: "{{ host }}"

  roles:
    - ansible_dependencies
    - aliases

<snip />


  import_playbook:
    - /playbooks/one-offs/bash_history.yml -e host= "{{ host }}"
    - /playbooks/one-offs/dmesg_timestamps.yml -e host= "{{ host }}"
    - /playbooks/one-offs/grub_cmdline.yml -e host= "{{ host }}"

import_playbook is not a directive for a play, since it's a file with one or more play it's a directive on the top level.
So you need a dash in front and move it all the way to the left.

import_playbook doesn't take a list of playbook files, a little hint is that it's _playbook not _playbooks.

-e is misplaced, -e is a command line option so remove that.

It's not allowed to have space in-front or after the equal sign in Ansible yaml syntax.

So try

- import_playbook: /playbooks/one-offs/bash_history.yml host="{{ host }}" - import_playbook: /playbooks/one-offs/dmesg_timestamps.yml host="{{ host }}"
...
...


--
Kai Stian Olstad

--
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/ae3abbd571eb003d601904c7d9a9dea3%40olstad.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to