Take a look at "exact_count" in the Ec2 module for #2, as combined with the
add_host module.

This is a pretty common pattern.

With add_host you can throw the machine into a group, and the group_vars
files will pick up and be applied.

Any specific questions?



On Tue, Sep 9, 2014 at 4:34 PM, Jeremy Gailor <[email protected]> wrote:

> I think I have an idea about how to do this, but I wanted some guidance
> from the Ansible community:
>
> What I would like to do is the following:
>
> 1) Run ansible-playbook
> 2) Ensure that there are X nodes in EC2 matching some criteria (an
> instance tag would be best), and create additional instances as necessary
> to bring the count up to X
> 3) Add each of the instance found/created to the set of hosts or the play
> 4) Add host variables based on instance tags on each of the instances
> 5) Run my play (and all associated roles) against that list of hosts built
> from the previous steps.
>
> Thanks for the help.
>
> --
> 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/718b9ed2-ecb5-4855-bc10-695a1beabc5f%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/718b9ed2-ecb5-4855-bc10-695a1beabc5f%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%2BnsWgx5WfLWJPffCqOpun5dMbX90%3D0MEm3AK9-CJN2Fr3wU9A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to