Hi,

I'm using a lot of parameters when I instantiate an ec2 instance. I'd like
to reuse the same configuration for all my instances and extend them
depending on instances.
For example, my global variable is

ec2_parameters:
   key_name: mykey
   instance_type: mytype
   image: ami-60a10117
   region: myregion

and in my playbook, I'd like to use the same ec2_parameters and to add some
configuration depending on the instance I configure :

host: instance_type_1
   vars:
     ec2:
       "{{ ec2_parameters + dict(foo='bar') }}"


host: instance_type_2
   vars:
     ec2:
       "{{ ec2_parameters + dict(foo='toto') }}"

Is there a way to do that easily ?

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 ansible-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/5ffd6330-4280-4f96-a59a-204ac5ec6e56%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 1 | next ›
Discussion Overview
groupansible-project @
postedDec 22, '14 at 5:10p
activeDec 22, '14 at 5:10p
posts1
users1

1 user in discussion

Cyril Scetbon: 1 post

People

Translate

site design / logo © 2022 Grokbase