diff options
| author | Ahmed Abdelhalim <[email protected]> | 2026-07-06 01:49:45 +0200 |
|---|---|---|
| committer | Ahmed Abdelhalim <[email protected]> | 2026-07-06 01:49:45 +0200 |
| commit | 09fbb2b1d86b8ad6671c746f3df997390f7a6293 (patch) | |
| tree | 24cddc6e7b0ad6c18a320d215e67b9c6970ef246 /roles/pve | |
| parent | 0e7e66f00da0b37ef68cca0d13a1588a30cb9235 (diff) | |
Fix pve network setup
Diffstat (limited to 'roles/pve')
| -rw-r--r-- | roles/pve/tasks/main.yml | 12 | ||||
| -rw-r--r-- | roles/pve/templates/hosts.j2 | 5 |
2 files changed, 17 insertions, 0 deletions
diff --git a/roles/pve/tasks/main.yml b/roles/pve/tasks/main.yml index 8c54c27c..494fc7aa 100644 --- a/roles/pve/tasks/main.yml +++ b/roles/pve/tasks/main.yml @@ -1,4 +1,16 @@ --- +- name: "Set management IP in /etc/hosts for PVE cert generation" + become: true + ansible.builtin.template: + src: "hosts.j2" + dest: "/etc/hosts" + owner: "root" + group: "root" + mode: "0644" + tags: + # pveproxy not available in containers — requires proxmox-ve package + - "molecule-notest" + - name: "Install proxmox-ve" become: true ansible.builtin.apt: diff --git a/roles/pve/templates/hosts.j2 b/roles/pve/templates/hosts.j2 new file mode 100644 index 00000000..5cebad3c --- /dev/null +++ b/roles/pve/templates/hosts.j2 @@ -0,0 +1,5 @@ +127.0.0.1 localhost +{{ network_ipv4_address }} {{ ansible_facts['hostname'] }} +::1 localhost ip6-localhost ip6-loopback +ff02::1 ip6-allnodes +ff02::2 ip6-allrouters |
