Go to file
2024-05-16 18:28:31 +03:00
defaults rename parameter for hosts pinning 2022-12-12 11:58:34 +03:00
meta update meta description 2024-05-16 18:28:31 +03:00
tasks rename parameter for hosts pinning 2022-12-12 11:58:34 +03:00
.gitignore add gitignore 2022-07-28 18:00:58 +03:00
README.md rename parameter for hosts pinning 2022-12-12 11:58:34 +03:00

Add records in format ${ansible_host} ${FQDN} ${short} from inventory to /etc/hosts

Config example:

hosts_pin: yes

Inventory example:

node1.site.local ansible_host=10.2.1.5
node2.site.local ansible_host=10.2.1.6
node3.site.local ansible_host=10.2.1.7

Result /etc/hosts:

10.2.1.5 node1.site.local node1
10.2.1.6 node2.site.local node2
10.2.1.7 node3.site.local node3