Kai Stian Olstad
unread,Feb 14, 2018, 12:53:36 AM2/14/18Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ansible...@googlegroups.com
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