Roles must be a list, but the value of roles is not templated.

It expects this to be in the playbook.

It wouldn't work with inventory variables anyway, so there's not much point.

Inventory variables happen after tasks start getting parsed.




On Sat, Jul 26, 2014 at 2:09 PM, Evan Kaufman <[email protected]>
wrote:

> 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
> <https://groups.google.com/d/msgid/ansible-project/cb9c622c-bb3d-42ca-b9e8-ca3dbe297cba%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CA%2BnsWgy4WMDMX4YOPViRPTC7L0FO%3D%2BHsEPcC8YeF6Lu2ZoiFhw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to