diff --git a/roles/proxmox/handlers/main.yml b/roles/proxmox/handlers/main.yml new file mode 100644 index 0000000..851b949 --- /dev/null +++ b/roles/proxmox/handlers/main.yml @@ -0,0 +1,2 @@ +- name: reload interfaces + command: ifreload -a diff --git a/roles/proxmox/tasks/main.yml b/roles/proxmox/tasks/main.yml new file mode 100644 index 0000000..e53cb35 --- /dev/null +++ b/roles/proxmox/tasks/main.yml @@ -0,0 +1,16 @@ +- name: Disable enterprise repositories + apt_repository: + repo: '{{ item }}' + state: absent + update_cache: '{{ ansible_loop.last }}' + loop: + - 'deb https://enterprise.proxmox.com/debian/pve {{ ansible_distribution_release }} pve-enterprise' + - 'deb https://enterprise.proxmox.com/debian/ceph-quincy {{ ansible_distribution_release }} enterprise' + loop_control: + extended: true + +- name: Enable no-subscription repository + apt_repository: + repo: 'deb http://download.proxmox.com/debian/pve {{ ansible_distribution_release }} pve-no-subscription' + +- include_tasks: sdn.yml diff --git a/roles/proxmox/tasks/sdn.yml b/roles/proxmox/tasks/sdn.yml new file mode 100644 index 0000000..99cf402 --- /dev/null +++ b/roles/proxmox/tasks/sdn.yml @@ -0,0 +1,9 @@ +- name: Install packages for SDN + package: + name: libpve-network-perl + +- name: Source SDN network configuration + lineinfile: + path: /etc/network/interfaces + line: 'source /etc/network/interfaces.d/*' + notify: reload interfaces