2024-05-14 10:40:33 +00:00
|
|
|
# choose a node for tasks that should only run on (any) one node, e.g. when writing to /etc/pve
|
2024-05-18 16:35:41 +00:00
|
|
|
- name: Select the primary node
|
2024-05-14 10:40:33 +00:00
|
|
|
set_fact:
|
2024-05-18 16:35:41 +00:00
|
|
|
is_primary: '{{ inventory_hostname == (nodes | map(attribute="inventory_hostname") | sort | first) }}'
|
2024-05-14 10:40:33 +00:00
|
|
|
|
2023-07-14 12:17:44 +00:00
|
|
|
- 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'
|
|
|
|
|
2024-04-05 07:26:06 +00:00
|
|
|
- name: Set up sysctls
|
|
|
|
copy:
|
|
|
|
dest: /etc/sysctl.d/local.conf
|
|
|
|
src: sysctl.conf
|
|
|
|
|
2024-05-18 16:35:41 +00:00
|
|
|
- name: Set VXLAN local tunnel IP
|
2023-10-05 10:42:29 +00:00
|
|
|
template:
|
2024-05-18 16:35:41 +00:00
|
|
|
dest: /etc/network/interfaces.d/loopback.intf
|
|
|
|
src: loopback.intf.j2
|
2023-10-05 10:42:29 +00:00
|
|
|
notify: reload interfaces
|
|
|
|
|
2024-02-26 13:30:17 +00:00
|
|
|
- name: Set up bridges
|
2023-10-18 13:01:02 +00:00
|
|
|
template:
|
2024-02-26 13:30:17 +00:00
|
|
|
dest: /etc/network/interfaces
|
|
|
|
src: interfaces.j2
|
2023-10-18 13:01:02 +00:00
|
|
|
mode: 0644
|
|
|
|
notify: reload interfaces
|
|
|
|
|
2024-04-05 04:00:50 +00:00
|
|
|
- include_tasks: firewall.yml
|
|
|
|
|
2024-05-14 10:04:35 +00:00
|
|
|
- include_tasks: user.yml
|