proxmox: standardize interface names and set up management VRF
No idea how badly this clashes with GUI configuration.
This commit is contained in:
parent
aae782a66b
commit
2330edf479
8 changed files with 94 additions and 6 deletions
|
@ -13,4 +13,6 @@
|
|||
apt_repository:
|
||||
repo: 'deb http://download.proxmox.com/debian/pve {{ ansible_distribution_release }} pve-no-subscription'
|
||||
|
||||
- include_tasks: mgmt.yml
|
||||
|
||||
- include_tasks: sdn.yml
|
||||
|
|
38
roles/proxmox/tasks/mgmt.yml
Normal file
38
roles/proxmox/tasks/mgmt.yml
Normal file
|
@ -0,0 +1,38 @@
|
|||
# We could probably avoid rebooting in some cases, but those should never happen
|
||||
# in normal operation anyway. This way all setup is done before rebooting once.
|
||||
|
||||
- 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 interfaces
|
||||
template:
|
||||
dest: /etc/network/interfaces
|
||||
src: interfaces.j2
|
||||
mode: 0644
|
||||
notify: reboot
|
||||
|
||||
- name: Configure SSH instance in management VRF
|
||||
template:
|
||||
dest: /etc/ssh/sshd_config.mgmt
|
||||
src: sshd_config.mgmt.j2
|
||||
mode: 0644
|
||||
notify: reboot
|
||||
|
||||
- name: Set up a SSH instance in management VRF
|
||||
copy:
|
||||
dest: /etc/systemd/system/
|
||||
src: sshd@mgmt.service
|
||||
mode: 0644
|
||||
notify: reboot
|
||||
|
||||
- name: Enable management SSH
|
||||
service:
|
||||
name: sshd@mgmt
|
||||
enabled: yes
|
||||
notify: reboot
|
||||
|
||||
- meta: flush_handlers
|
|
@ -1,9 +1,3 @@
|
|||
- 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…
Add table
Add a link
Reference in a new issue