diff --git a/provision.yml b/provision.yml index 0dc4330..ba8265c 100644 --- a/provision.yml +++ b/provision.yml @@ -56,7 +56,8 @@ mode: 0644 - name: register nodes in /etc/hosts lineinfile: - dest: /etc/hosts regexp=".*{{ item }}$" + path: /etc/hosts + regexp: ".*{{ item }}$" line: "{{ hostvars[item].ansible_default_ipv4.address }} {{ item }}" state: present when: hostvars[item].ansible_default_ipv4.address is defined