connection variables

Inventory variables with reserved names, such as ansible_user, ansible_port and ansible_connection, that tell Ansible how to reach and log in to a host.

In more detail

They are ordinary variables, so they can be set on a host, a group or everything, and follow the same precedence rules. ansible_user is the account you connect as, which is different from the account you become. A per-host override sits on the host's own line in an INI inventory.

Example

[webservers:vars]
ansible_user=deploy

Related terms

Taught in

References

Certification courses