- name: Remove subscription notification replace: path: /usr/share/pve-manager/js/pvemanagerlib.js regexp: "data\\.status !== 'Active'" replace: "0" backup: yes become: true - name: "Build hosts file" lineinfile: dest: /etc/hosts regexp: '^{{ hostvars[item].ansible_default_ipv4.address }}.*$' line: "{{ hostvars[item].ansible_default_ipv4.address }} {{ item }}.dualinventive.local {{ item }}{% if item == ansible_hostname%} pvelocalhost{% endif %}" state: present backup: yes when: hostvars[item].ansible_default_ipv4.address is defined with_items: '{{ groups["vhosts"] }}' become: true