From c34aab16af183e21eaa09f5e3965eb56659f4e7b Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Fri, 14 Oct 2022 01:55:15 -0400 Subject: [PATCH] Add copying of rc.conf. --- .../environments/home/host_vars/homeserver | 1 + ansible/roles/base/files/homeserver_rc.conf | 15 +++++++++++++ ansible/roles/base/tasks/freebsd.yaml | 22 ++++++++++++------- 3 files changed, 30 insertions(+), 8 deletions(-) create mode 100644 ansible/roles/base/files/homeserver_rc.conf diff --git a/ansible/environments/home/host_vars/homeserver b/ansible/environments/home/host_vars/homeserver index 290af65..3d49d2a 100644 --- a/ansible/environments/home/host_vars/homeserver +++ b/ansible/environments/home/host_vars/homeserver @@ -8,3 +8,4 @@ pflog_conf: - name: 0 dev: pflog0 network_rc: "homeserver_network.conf" +rc_conf: "homeserver_rc.conf" diff --git a/ansible/roles/base/files/homeserver_rc.conf b/ansible/roles/base/files/homeserver_rc.conf new file mode 100644 index 0000000..65cf777 --- /dev/null +++ b/ansible/roles/base/files/homeserver_rc.conf @@ -0,0 +1,15 @@ +clear_tmp_enable="YES" +syslogd_flags="-ss" +sendmail_enable="NONE" +hostname="computer" +# wlans_ath0="wlan0" +wlans_run0="wlan0" +ifconfig_wlan0="WPA DHCP" +ifconfig_wlan0_ipv6="inet6 accept_rtadv" +local_unbound_enable="YES" +sshd_enable="YES" +ntpd_enable="YES" +powerd_enable="YES" +# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable +dumpdev="NO" +zfs_enable="YES" diff --git a/ansible/roles/base/tasks/freebsd.yaml b/ansible/roles/base/tasks/freebsd.yaml index 075e95b..9aeb453 100644 --- a/ansible/roles/base/tasks/freebsd.yaml +++ b/ansible/roles/base/tasks/freebsd.yaml @@ -68,11 +68,17 @@ # mode: 0644 # when: loader_conf is defined -# - name: Install rc.conf -# copy: -# src: "{{rc_conf}}" -# dest: /etc/rc.conf -# mode: 0644 -# owner: root -# group: wheel -# when: rc_conf is defined +- name: Install rc.conf + copy: + src: "{{rc_conf}}" + dest: /etc/rc.conf + mode: 0644 + owner: root + group: wheel + when: rc_conf is defined + +- name: Delete rc.conf + file: + path: /etc/rc.conf + start: absent + when: rc_conf is not defined