mirror of
https://gitea.0xace.cc/ansible-galaxy/hosts.git
synced 2024-11-24 23:06:39 +00:00
rename parameter for hosts pinning
This commit is contained in:
parent
c78e3e0a37
commit
039c130c9b
@ -2,7 +2,7 @@ Add records in format ${ansible_host} ${FQDN} ${short} from inventory to /etc/ho
|
||||
|
||||
Config example:
|
||||
|
||||
pin_hosts: yes
|
||||
hosts_pin: yes
|
||||
|
||||
Inventory example:
|
||||
|
||||
|
@ -1 +1 @@
|
||||
pin_hosts: yes
|
||||
hosts_pin: yes
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
- block:
|
||||
- name: add ip address of all hosts to all hosts
|
||||
- name: Add ip address of all hosts to all hosts
|
||||
lineinfile:
|
||||
dest: /etc/hosts
|
||||
regexp: '.*{{ item }} {{ item.split(".")[0] }}$'
|
||||
@ -8,7 +8,7 @@
|
||||
state: present
|
||||
when:
|
||||
- hostvars[item].ansible_host is defined
|
||||
- pin_hosts
|
||||
- hosts_pin
|
||||
with_items: "{{ ansible_play_hosts_all }}"
|
||||
tags:
|
||||
- hosts
|
||||
|
Loading…
Reference in New Issue
Block a user