--- - name: PVE base configuration hosts: proxmox tasks: - name: Generate ipid set_fact: new_fact: "{{ inventory_hostname | regex_replace('pve', '') }}" - name: UI primary IP (/etc/hosts) tags: network ansible.builtin.lineinfile: path: /etc/hosts regexp: ' {{ inventory_hostname_short }}$' line: '2001:bb8:4008:21:20::{{ ipid }} {{ inventory_hostname }} {{ inventory_hostname_short }}' - name: /etc/network/interfaces tags: network ansible.builtin.template: src: templates/network.interfaces.j2 dest: /etc/network/interfaces notify: reload networking handlers: - name: reload networking ansible.builtin.systemd_service: name: networking.service state: reloaded