On 27.01.17 14:46 Cev Ing wrote:

> How to get the different SSH keys in the users.yml without
> duplicating all the remaining data for each environment?

group_vars would be another idea.

> But how to know in a playbook in which environment the playbook is
> executed?

Setting a variable? If you set this variable inside your different
variable files, then you could use this variable to get the right item
out of the hash.

I.e. set 'foobar=production' in your production variable file, and
then use the value of foobar to get the right hash.

Or am I missing a bit here?

Johannes


-- 
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/10e40750-f90f-7a05-14f4-9fade17cbe69%40ojkastl.de.
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to