servers/roles/proxmox/tasks/main.yml
Timotej Lazar 25bcddede1 Factor frr role from debian, ceph and proxmox
Consolidate base system and networking setup into debian role and BGP
configuration into frr role. Add facts role to collect data from NetBox
once to avoid many slow lookups. Also many other tweaks and cleanups.
2024-05-19 14:21:25 +02:00

42 lines
1.2 KiB
YAML

# choose a node for tasks that should only run on (any) one node, e.g. when writing to /etc/pve
- name: Select the primary node
set_fact:
is_primary: '{{ inventory_hostname == (nodes | map(attribute="inventory_hostname") | sort | first) }}'
- 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'
- name: Set up sysctls
copy:
dest: /etc/sysctl.d/local.conf
src: sysctl.conf
- name: Set VXLAN local tunnel IP
template:
dest: /etc/network/interfaces.d/loopback.intf
src: loopback.intf.j2
notify: reload interfaces
- name: Set up bridges
template:
dest: /etc/network/interfaces
src: interfaces.j2
mode: 0644
notify: reload interfaces
- include_tasks: firewall.yml
- include_tasks: user.yml