Hey guys,
I've written a playbook that defines the configuration policies for an
"application server" running nodejs. I've been using this playbook to
provision a vagrant box (local sandbox) with great success but now I want
to use this playbook to provision sandboxes in the cloud.
Ultimately I'd like to be able to spin up and provision an infinite number
of environments, each existing as their own subdomain e.g.
sandbox1.mydomain,com sandbox2.mydomain.com. I've looked into spinning up
instances and dynamically so that they are added to my inventory allowing
me to then target them for provisioning easily:
[appservers]
1.2.3.4
5.6.7.8
--- hosts: appservers
roles: nodejs
However, how do I distinguish between sandbox1 and sandbox2 in the
inventory file whilst maintaining the "appserver" policy? I would like the
run a deployment script that only targets the specified sandbox? I was
thinking something along the lines of:
[appservers]
1.2.3.4
5.6.7.8
[sandbox1]
1.2.3.4
[sandbox2]
5.6.7.8
And then I can target --limit sandbox1 to only run the deployment task
against this group.
Is this a valid way of achieving my goal?
--
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/0767671e-4a6f-4687-8aea-e5a7414b1287%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.