Hi,
I'm just getting started with Ansible roles, and hit an error on my first
attempt. Any help on debugging would be appreciated.
[ansible@localhost deploy]$ ansible-playbook -c ssh
--private-key=~/.ssh/AWSVBT.pem -vvvv couchbase.yml
Traceback (most recent call last):
File "/usr/bin/ansible-playbook", line 269, in <module>
sys.exit(main(sys.argv[1:]))
File "/usr/bin/ansible-playbook", line 209, in main
pb.run()
File "/usr/lib/python2.6/site-packages/ansible/playbook/__init__.py",
line 229, in run
play = Play(self, play_ds, play_basedir)
File "/usr/lib/python2.6/site-packages/ansible/playbook/play.py", line
130, in __init__
self._tasks = self._load_tasks(self._ds.get('tasks', []),
load_vars)
File "/usr/lib/python2.6/site-packages/ansible/playbook/play.py", line
536, in _load_tasks
x['role_name'] = new_role
TypeError: 'str' object does not support item assignment
couchbase.yml looks like:
---
# playbook for all couchbase servers
- name: couchbase-config
hosts: couchbase
user: root
roles:
- couchbase
couchbase/tasks/main.yml looks like:
---
# tasks for couchbase role installation
-include: couchbase-common.yml
couchbase/tasks/couchbase-common.yml contains several tasks.
*If I rename couchbase-common.yml to main.yml, I don't get the error.*
For code structuring, I'd like to split the tasks into multiple files, and
include them all into main.yml. Is this not supported? Is there a better
way to do this?
I'm running ansible 1.4.1.
Thanks,
Rob
--
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].
For more options, visit https://groups.google.com/groups/opt_out.