Hi all! Up until now, I've provisioned machines in EC2 in two stages - the 
first set of playbooks launch the machine and tag it as necessary, and then 
a second set of playbooks does the proper provisioning, using group_vars 
identified automatically according to the tag_NAME_VALUE convention to 
dictate how the plays are run.

I've just changed this process so the launching and configuration happens 
all in the same set of playbooks, i.e. there's no break in between these 
playbooks running. With this done, it seems the group vars matching the new 
instance's tags are not applied automatically - possibly because these are 
evaluated by the dynamic inventory script when the overarching play begins, 
and not as new items enter the inventory?

After reading around, I believe that were I to manually add the instance 
into groups (named after each of its tags) after launch, the matching 
group_vars would be loaded and applied (I've tried and can't get this to 
work, though). In any case that's not an obvious way to do it - so I was 
hoping someone could suggest an alternative? Is there a way to force a 
reload of group vars based on an updated dynamic inventory during a play?

-- 
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/108e4ebf-159b-48ba-a40d-6026afc3413d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to