I'm trying to accomplish something similar, where I'd have a list of roles
defined in the *group_vars/all* file (where I'd disable certain roles by
just commenting them out):
---
install_roles:
- apache
#- nginx
- php
- mysql
#- mariadb
- varnish
And then use that list variable in the *provision.yml* file:
---
- hosts: local
gather_facts: yes
roles: install_roles # first try
roles: "{{ install_roles }}" # second try
roles: { with_items: install_roles } # third try
However, all the variations above fail with "ERROR: value of 'roles:' must
be a list", so I'm guessing using a list var for roles is *not* supported?
--
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/cb9c622c-bb3d-42ca-b9e8-ca3dbe297cba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.