Is it possible to define different variables for different hosts? like:
- hosts: server_a: var_a: "xxx" server_b: var_b: "yyy" roles: - some_role
Host (and group) variables are not stored in the playbook. They are stored separately, in the inventory file itself, or in files in a directory
group_vars relative to the inventory file. These files are named after the host or group for which they contain variables.
See Organizing host and group variables in the Ansible documentation for a more complete description of the variable files.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.