Hi!
I try to do dynamic role calling in playbook like that :
---
- hosts: "{{ HOST }}"
user: root
roles:
- "{{ JMODULES }}"
command : ansible-playbook test.yml --extra-vars
'{"JMODULES":["apache","haproxy"]}'
I get an error : AttributeError: 'list' object has no attribute 'startswith'
If I change to
---
- hosts: "{{ HOST }}"
user: root
roles: "{{ JMODULES }}"
I get : ERROR: value of 'roles:' must be a list
Any help?
Thank you!
--
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.