Hmmm, I guess not...
$ ansible-playbook -i temp-stor-inv -u root -k site.yml --tags=mailserver
-e "distro=os-Fedora-20"
SSH password:
Traceback (most recent call last):
File "/usr/bin/ansible-playbook", line 309, in <module>
sys.exit(main(sys.argv[1:]))
File "/usr/bin/ansible-playbook", line 191, in main
force_handlers=options.force_handlers
File "/usr/lib/pymodules/python2.7/ansible/playbook/__init__.py", line
180, in __init__
(self.playbook, self.play_basedirs) =
self._load_playbook_from_file(playbook, vars)
File "/usr/lib/pymodules/python2.7/ansible/playbook/__init__.py", line
271, in _load_playbook_from_file
inc_vars, inc_path = self._get_include_info(play, basedir, play_vars)
File "/usr/lib/pymodules/python2.7/ansible/playbook/__init__.py", line
208, in _get_include_info
tokens = shlex.split(play_ds.get('include', ''))
File "/usr/lib/python2.7/shlex.py", line 279, in split
return list(lex)
File "/usr/lib/python2.7/shlex.py", line 269, in next
token = self.get_token()
File "/usr/lib/python2.7/shlex.py", line 96, in get_token
raw = self.read_token()
File "/usr/lib/python2.7/shlex.py", line 124, in read_token
nextchar = self.instream.read(1)
AttributeError: 'list' object has no attribute 'read'
On Friday, September 12, 2014 2:15:47 PM UTC-4, Willard Dennis wrote:
>
> Thanks, Michael! But can I do the following?
>
> $ cat site.yml
> ---
>
> - hosts: all
> tasks:
> # Set up OS-specific groups
> - group_by:
> key=os-{{ansible_distribution}}-{{ansible_distribution_version}}
>
> - hosts: "{{ distro | default('all') }}"
> include:
> - dept1-servers.yml
> - dept2-servers.yml
> - base-static-setup.yml
>
>
> Rather not change the individual playbooks if I can help it.
>
> Thanks,
> Will
>
--
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/98818c0c-5a9f-49de-ba20-ada11c535d30%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.