diff --git a/.gitignore b/.gitignore index 76e3822..160aab6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ *.keys -secrets/ +/secrets .idea/ diff --git a/proxmox/general.yaml b/proxmox/base.yaml similarity index 82% rename from proxmox/general.yaml rename to proxmox/base.yaml index 2be199d..a691ea7 100644 --- a/proxmox/general.yaml +++ b/proxmox/base.yaml @@ -1,22 +1,7 @@ --- - name: PVE base configuration hosts: proxmox - serial: 1 # one host at a time tasks: - - name: UI primary IP (/etc/hosts) - tags: network - ansible.builtin.lineinfile: - path: /etc/hosts - regexp: ' {{ inventory_hostname_short }}$' - line: '{{ primary_ipv6 | split("/") | first }} {{ 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 - - name: admin convenience packages tags: dep apt: @@ -87,12 +72,6 @@ options vhost max_mem_regions=512 dest: /etc/modprobe.d/vhost.conf - handlers: - - name: reload networking - ansible.builtin.systemd_service: - name: networking.service - state: reloaded - - name: PVE admin tooling hosts: proxmox tasks: diff --git a/proxmox/ceph.yaml b/proxmox/networking.yaml similarity index 73% rename from proxmox/ceph.yaml rename to proxmox/networking.yaml index 2213cfa..5e17edb 100644 --- a/proxmox/ceph.yaml +++ b/proxmox/networking.yaml @@ -1,6 +1,26 @@ +- name: PVE base network configuration + hosts: proxmox + serial: 1 # one host at a time + tasks: + - name: /etc/network/interfaces + tags: network + ansible.builtin.template: + src: templates/network.interfaces.j2 + dest: /etc/network/interfaces + notify: reload networking + - name: UI primary IP (/etc/hosts) + tags: network + ansible.builtin.lineinfile: + path: /etc/hosts + regexp: ' {{ inventory_hostname_short }}$' + line: '{{ primary_ipv6 | split("/") | first }} {{ inventory_hostname }} {{ inventory_hostname_short }}' + handlers: + - name: reload networking + ansible.builtin.systemd_service: + name: networking.service + state: reloaded --- - -- name: configure ceph on proxmox +- name: PVE CEPH network configuration hosts: - pve90.proxmox.infra.k-space.ee - pve91.proxmox.infra.k-space.ee