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