From 37a14759f75bec6656bbf2354cc9eca76bf563ab Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sun, 28 May 2023 14:22:49 -0400 Subject: [PATCH] Switch to a lagg interface. This is to avoid depending on the ethernet cable being plugged into a specific port. --- ansible/environments/colo/host_vars/mrmanager | 2 ++ ansible/roles/base/files/mrmanager_rc.conf | 4 ---- ansible/roles/network/files/mrmanager_network.conf | 5 +++++ ansible/roles/network/files/mrmanager_routing.conf | 1 + ansible/roles/network/tasks/freebsd.yaml | 12 ++++++++++++ 5 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 ansible/roles/network/files/mrmanager_network.conf create mode 100644 ansible/roles/network/files/mrmanager_routing.conf diff --git a/ansible/environments/colo/host_vars/mrmanager b/ansible/environments/colo/host_vars/mrmanager index ebd9ae4..583ac2e 100644 --- a/ansible/environments/colo/host_vars/mrmanager +++ b/ansible/environments/colo/host_vars/mrmanager @@ -4,3 +4,5 @@ zfs_snapshot_datasets: sshd_enabled: true loader_conf: "mrmanager_loader.conf" rc_conf: "mrmanager_rc.conf" +network_rc: "mrmanager_network.conf" +routing_rc: "mrmanager_routing.conf" diff --git a/ansible/roles/base/files/mrmanager_rc.conf b/ansible/roles/base/files/mrmanager_rc.conf index 4b36618..4002dd7 100644 --- a/ansible/roles/base/files/mrmanager_rc.conf +++ b/ansible/roles/base/files/mrmanager_rc.conf @@ -1,8 +1,4 @@ hostname="mrmanager" -ifconfig_igb0="inet 74.80.180.138 netmask 255.255.255.248" -ifconfig_igb1="inet 74.80.180.139 netmask 255.255.255.248" -defaultrouter="74.80.180.137" -sshd_enable="YES" zfs_enable="YES" wireguard_enable="YES" wireguard_interfaces="colo" diff --git a/ansible/roles/network/files/mrmanager_network.conf b/ansible/roles/network/files/mrmanager_network.conf new file mode 100644 index 0000000..4d2ae08 --- /dev/null +++ b/ansible/roles/network/files/mrmanager_network.conf @@ -0,0 +1,5 @@ +cloned_interfaces="lagg0" +ifconfig_igb0="up" +ifconfig_igb1="up" +ifconfig_lagg0="up laggproto failover laggport igb0 laggport igb1" +ifconfig_lagg0_alias0="inet 74.80.180.138 netmask 255.255.255.248" diff --git a/ansible/roles/network/files/mrmanager_routing.conf b/ansible/roles/network/files/mrmanager_routing.conf new file mode 100644 index 0000000..2544e1e --- /dev/null +++ b/ansible/roles/network/files/mrmanager_routing.conf @@ -0,0 +1 @@ +defaultrouter="74.80.180.137" diff --git a/ansible/roles/network/tasks/freebsd.yaml b/ansible/roles/network/tasks/freebsd.yaml index 49de8b2..b7c0996 100644 --- a/ansible/roles/network/tasks/freebsd.yaml +++ b/ansible/roles/network/tasks/freebsd.yaml @@ -11,6 +11,18 @@ - src: "{{ network_rc }}" dest: /etc/rc.conf.d/network +- name: Install configuration + copy: + src: "files/{{ item.src }}" + dest: "{{ item.dest }}" + mode: 0644 + owner: root + group: wheel + when: routing_rc is defined + loop: + - src: "{{ routing_rc }}" + dest: /etc/rc.conf.d/routing + - name: Install configuration copy: src: "files/{{ item.src }}"