From 039c130c9ba1413d5b4390e7f43e046c802f98a7 Mon Sep 17 00:00:00 2001 From: ace Date: Mon, 12 Dec 2022 11:58:34 +0300 Subject: [PATCH] rename parameter for hosts pinning --- README.md | 2 +- defaults/main.yaml | 2 +- tasks/main.yaml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1727009..7979656 100644 --- a/README.md +++ b/README.md @@ -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: diff --git a/defaults/main.yaml b/defaults/main.yaml index b7e44aa..e8e2fa5 100644 --- a/defaults/main.yaml +++ b/defaults/main.yaml @@ -1 +1 @@ -pin_hosts: yes +hosts_pin: yes diff --git a/tasks/main.yaml b/tasks/main.yaml index d6e3240..764d1b2 100644 --- a/tasks/main.yaml +++ b/tasks/main.yaml @@ -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