You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ansible has three variables, namely inventory_hostname, ansible_hostname and ansible_host for referring to hostname / IP address of a host. We need to select a consistent variable to refer to the following.
inventory_hostname
app-specific component names which match DNS strings
Ex: ms.autolabjs.com, lb.autolabjs.com, en1.autolabjs.com etc.
ansible_host
IP address to be used to connect to a remote server using SSH, can be "localhost". If this variable is not specified, then inventory_hostname shall be used for connection.
We can use a domain name too, but the DNS resolution must be in place.
ansible_port
SSH port to connect to on remove server, defaults to 22.
ansible_hostname
This is the hostname of remote host learnt by Ansible using "gather facts". If gather facts is set to false, then this variable is undefined.
We don't have control over this variable, DON'T USE IT.
auto-construction of Ansible variables in inventory
Jinja2 templates are supported in Ansible inventory too. For example,
Description
Ansible has three variables, namely
inventory_hostname
,ansible_hostname
andansible_host
for referring to hostname / IP address of a host. We need to select a consistent variable to refer to the following.Expected behavior:
Conventions are set for easy configuration, installation and update of AutolabJS across single and many systems.
Actual behavior:
There is no consistent use of variable names.
References
The text was updated successfully, but these errors were encountered: