Add role to set up base Proxmox server
This commit is contained in:
parent
db310ba716
commit
aae782a66b
2
roles/proxmox/handlers/main.yml
Normal file
2
roles/proxmox/handlers/main.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
- name: reload interfaces
|
||||
command: ifreload -a
|
16
roles/proxmox/tasks/main.yml
Normal file
16
roles/proxmox/tasks/main.yml
Normal file
|
@ -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
|
9
roles/proxmox/tasks/sdn.yml
Normal file
9
roles/proxmox/tasks/sdn.yml
Normal file
|
@ -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
|
Loading…
Reference in a new issue