Hey all,
I'm coming from the Puppet world and learning (and loving!) more about
Ansible. I'm curious how others would go about deploying a variable number
of copies of an application to a given host?
In the Puppet world, I've solved this by leveraging the create_resources()
function with a dictionary of dictionaries:
host1.yml:
app_instances:
instance1:
port: 1234
param: foo
optional_param: true
instance2:
port: 5678
param: bar
host2.yml:
app_instances:
instance1:
port: 9000
param: baz
Puppet class:
create_resouces(my_application_class, $app_instances)
This works by invoking my_application_class once for each instance defined
in the datastructure. It looks like I can accomplish something akin to
this in Ansible by utilizing with_items/with_dict and looping over a
boiler-plate role N times.
Has anyone successfully accomplished this, am I headed in the right
direction? How did you do it?
Thanks!
--
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/94cc56c3-563f-4282-8efa-ad3669f4bb33%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.