Is there a way to create host variables based on the tags on an instance? 
(without manually listing each variable and tag under the compose section)

The idea is bascially to allow the equivalent of the INI-style inventory 
file using tags from AWS. (With the relevant variables using a prefix to 
identify them)

e.g. If an instance has these tags: (The array syntax is assumed from what 
works in the INI-style inventory)
ansible_swapfile_size=4G
ansible_extra_packages=["htop","iotop"]

I want these variables to be configured:
swapfile_size: 4G
extra_packages:
- htop
- iotop

compose seems to be capable of doing it if I list a fixed set of variables, 
but that means that if a new variable are added, the inventory would need 
to be edited.

Is there a way to dynamically generate variables based on tags?

Thanks,
Gert

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/3b5e734d-0e55-4724-ac44-a9c27822b0b5%40googlegroups.com.

Reply via email to