With somthing like that: => test.yml | - name: test | hosts: localhost | remote_user: root | gather_facts: False | | vars: | test_var: /tmp | | tasks: | - include: "{{ test_var }}/blah.yml" The command `ansible-playbook ./test.yml` throws traceback: | Traceback (most recent call last): | File "/bin/ansible-playbook", line 317, in <module> | sys.exit(main(sys.argv[1:])) | File "/bin/ansible-playbook", line 257, in main | pb.run() | File "/usr/lib/python2.7/site-packages/ansible/playbook/__init__.py", | line 289, in run play = Play(self, play_ds, play_basedir, | vault_password=self.vault_password) | File "/usr/lib/python2.7/site-packages/ansible/playbook/play.py", line | 152, in __init__ self._tasks = | self._load_tasks(self._ds.get('tasks', []), load_vars) | File "/usr/lib/python2.7/site-packages/ansible/playbook/play.py", line | 577, in _load_tasks (k,v) = t.split("=", 1) | ValueError: need more than 1 value to unpack This does not happen with 1.3 version which was rebased in stable fedora 20 to ansible 1.6.
Yeah, this was a bug found after 1.6.10 release. Can you please try 1.7 that is in updates-testing? yum --enablerepo=updates-testing update ansible The problem is the spaces... so: - include: "{{ test_var }}/blah.yml" will fail, but: - include: "{{test_var}}/blah.yml" will work. This should be fixed in 1.7
Karma given, thanks. https://admin.fedoraproject.org/updates/FEDORA-2014-9150/ansible-1.7-1.fc20
FWIW, that happened again in (EPEL) ansible-1.8.1-1, fixed by ansible-1.8.2-1.el7.noarch. Pavel