Hi folks,
I'm running a playbook that makes use of a few custom roles, and one of
them would benefit from being able to receive a YAML hash containing an
arbitrary number of items (think: passing in a set of environment variables
that should be set while running an executable). However, I'm failing to
figure out what the syntax for doing this might be. Here's where I'm at
right now:
---
- hosts: webservers
roles:
- { role: app,
role_var_1: somevalue,
role_var_2: someothervalue,
canidothis:
ENV_VAR_1: /some/path
ENV_VAR_1: /some/other/path
}
But that's not valid YAML syntax, apparently.
I'd like to be able to:
- Iterate over the list using the `template` module to emit key=value
items from `canidothis`
- Access `canidothis.ENV_VAR_1` (or equivalent) in a task
Am I missing some feature of YAML syntax that will let me accomplish this?
Thanks!
--
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/cd12d241-dbc0-4133-bd1c-19e00ecdf327%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.