Hi folks,

I've been trying to come up with a solution to what essentially boils down 
to this:

Say I'm writing, or simply using, a role which depends on a host var being 
set for all targeted hosts. An example is ZooKeeper, where each member of 
an ensemble needs a unique ID configured, and needs to enumerate all the 
other members in its config file (common for host in groups / hostvars 
pattern). I'd like to achieve this with an EC2 tag on each host, but say 
that the role already references a specific hostvar name (which naturally 
isn't ec2_tag_the_key_name_i_want).

Can anyone suggest a programmatic way to map values to a particular host 
var name during a run? set_fact only appears applicable to the context of a 
single host as it executes a run (a with_items: groups[foo] loop does not 
work). I don't particularly want to juggle names in DNS for these hosts in 
order to use named files in host_vars.

Thanks for your help!

Regards,
Ches

-- 
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/1a3d5eff-6802-4541-98ba-29c42f1f73fd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to