Look for group vars and put all servers in the same group in the inventory file.
Am 29.11.18 um 23:11 schrieb Andy:
I am new to ansible.
I create a yaml file with multiple hosts defined
---
-hosts: localhost
vars: ....
tasks: ....
-hosts: webserver1
vars: same as localhost
tasks: ....
-hosts: webserver2
vars: same as localhost
tasks: ...
- hosts: localhost
vars: same as localhost
tasks: ....
Is there a way for me to get all vars in one place instead of redefining it
multiple times?
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] <mailto:[email protected]>.
To post to this group, send email to [email protected]
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/7f325296-b492-4615-a85a-075d384cd416%40googlegroups.com
<https://groups.google.com/d/msgid/ansible-project/7f325296-b492-4615-a85a-075d384cd416%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.
--
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/2bdfa575-7d8c-61c9-38d5-95a0bff23233%40gmail.com.
For more options, visit https://groups.google.com/d/optout.