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