Hi,
We have our ansible playbooks working with no problem to deploy our servers
in Amazon ec2. One of the ansible modules we use is the ec2_facts in order
to configure some files , as for example we use the {{
ansible_ec2_placement_availability_zone }} value.
There is a chance we need to deploy some of our servers on a different
cloud provider or on bare metal servers, in that case the ec2_facts module
will fail.
I know I could just add an ignore_errors on the ec2_facts task but we need
to make sure when in AWS environment the ec2_facts are populated
successfully so I'm wondering how can we set default values when we run a
playbook in a non AWS environment ?
For example I would like to set the bellow without using "when:" or
specifying in advance if the inventory hosts are in ec2 or not :
ansible_ec2_placement_availability_zone : NA
Any ideas ?
Regards,
N.
--
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/dea52314-0a99-48e1-923a-9eb85ab14aa4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.