rename parameter for hosts pinning

This commit is contained in:
ace 2022-12-12 11:58:34 +03:00
parent c78e3e0a37
commit 039c130c9b
No known key found for this signature in database
GPG Key ID: 2E47CC17BA7F8CF0
3 changed files with 4 additions and 4 deletions

View File

@ -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:

View File

@ -1 +1 @@
pin_hosts: yes
hosts_pin: yes

View File

@ -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