From 9cd23a3b6841e7fa7fe51a12a7e76c54c504fadb Mon Sep 17 00:00:00 2001 From: Andrey Limachko Date: Wed, 9 Mar 2022 09:01:02 +0400 Subject: [PATCH] Remove hosts hardcode --- provision.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/provision.yml b/provision.yml index e73c56b..9d3c5cd 100644 --- a/provision.yml +++ b/provision.yml @@ -59,12 +59,12 @@ owner: root group: root mode: 0644 - - name: register nodes in /etc/hosts - lineinfile: - path: /etc/hosts - regexp: ".*{{ item }}$" - line: "{{ hostvars[item].ansible_default_ipv4.address }} {{ item }}" - state: present - when: hostvars[item].ansible_default_ipv4.address is defined - with_items: "{{ play_hosts }}" + #- name: register nodes in /etc/hosts + # lineinfile: + # path: /etc/hosts + # regexp: ".*{{ item }}$" + # line: "{{ hostvars[item].ansible_default_ipv4.address }} {{ item }}" + # state: present + # when: hostvars[item].ansible_default_ipv4.address is defined + # with_items: "{{ play_hosts }}" tags: [ prepare ]