Hey,

Sorry for the rubbish title. hard to summarise my question(s).

I'm looking to restructure an AWS estate, and I'm going to be using Ansible 
to drive CloudFormation and other parts of AWS.

The stacks will be more or less the same in each environment with the odd 
difference, and in my head I have two ways of how I approach this.

*Option 1*

I have a single role for a cloud formation stack. Within this role are all 
the templates, and a tasks/main.yml that creates a single stack.

I can then define playbooks for each environment that call the role 
multiple times with parameters defining what stack it should contain and 
the variables for those stacks, i.e. instance size, etc (I'm going to put 
the environment specific variables in the playbook).

If I do go down this route, there will be the odd task that won't be a 
CloudFormation stack. Shall I put that as another task file within the 
role, or as a separate roll altogether? Can you actually do the former? Not 
sure how to include a role and not execute the main.yml but another one.

*Option 2*

I go down the verbose route. I have a single role per CloudFormation stack 
and adhoc task, and just include each one as and when I want them in an 
environment.

Personally that feels like overkill and would have a lot of repetition 
(looking at 10+ stacks CloudFormation stacks for all the various elements).

--

Maybe the ideal route is a combination of the two? 1 role for 
CloudFormation stacks, parametrized so it can be reused, and lots of other 
roles for the adhoc stuff?

I guess there's not *right* answer, just personal preference, but would 
really appreciate some input assuming all that makes sense.

Cheers.

-- 
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/ff0d8e22-87b7-4701-8d69-067dafdc1d59%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to