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.noarchPlaybook:
---
- 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 }}"
...