mirror of
https://gitea.0xace.cc/ansible-galaxy/hosts.git
synced 2024-11-24 23:06:39 +00:00
19 lines
401 B
Markdown
19 lines
401 B
Markdown
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
|
|
|