55 lines
1.4 KiB
YAML
55 lines
1.4 KiB
YAML
- name: Get all nodes in my cluster
|
|
set_fact:
|
|
nodes: "{{ groups['cluster_'+cluster] | map('extract', hostvars) }}"
|
|
|
|
- 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 hostname
|
|
hostname:
|
|
name: '{{ inventory_hostname }}'
|
|
|
|
- name: Add rules to rename network interfaces
|
|
template:
|
|
dest: /etc/udev/rules.d/10-network.rules
|
|
src: 10-network.rules.j2
|
|
mode: 0644
|
|
notify: reboot
|
|
|
|
- name: Set up sysctls
|
|
copy:
|
|
dest: /etc/sysctl.d/local.conf
|
|
src: sysctl.conf
|
|
|
|
- name: Set up interfaces
|
|
template:
|
|
dest: /etc/network/interfaces.d/real.intf
|
|
src: real.intf.j2
|
|
mode: 0644
|
|
notify: reload interfaces
|
|
|
|
- name: Set up bridges
|
|
template:
|
|
dest: /etc/network/interfaces
|
|
src: interfaces.j2
|
|
mode: 0644
|
|
notify: reload interfaces
|
|
|
|
- include_tasks: mgmt.yml
|
|
|
|
- include_tasks: firewall.yml
|
|
|
|
- include_tasks: frr.yml
|