From dac4734a807bc04fbca3786094ca3237094de07f Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Fri, 2 Dec 2022 22:13:32 -0500 Subject: [PATCH] Move the nat_dhcp jail to an unencrypted dataset so it can be available at boot. --- ansible/environments/home/host_vars/homeserver | 5 +++++ ansible/environments/home/hosts | 2 +- ansible/roles/media/tasks/common.yaml | 1 + ansible/roles/media/tasks/peruser.yaml | 2 ++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ansible/environments/home/host_vars/homeserver b/ansible/environments/home/host_vars/homeserver index 049a3c0..d95e459 100644 --- a/ansible/environments/home/host_vars/homeserver +++ b/ansible/environments/home/host_vars/homeserver @@ -22,6 +22,11 @@ jail_zfs_dataset_mountpoint: /jail/main jail_canmount: "on" jail_bemount: "on" jail_list: + - name: nat_dhcp + dataset: zmass/unencrypted/jails + enabled: true + conf: + src: nat_dhcp - name: cloak conf: src: cloak diff --git a/ansible/environments/home/hosts b/ansible/environments/home/hosts index 0bf6393..d1343eb 100644 --- a/ansible/environments/home/hosts +++ b/ansible/environments/home/hosts @@ -1,2 +1,2 @@ [headless] -homeserver ansible_user=talexander ansible_host=192.168.1.123 +homeserver ansible_user=talexander ansible_host=172.16.16.2 diff --git a/ansible/roles/media/tasks/common.yaml b/ansible/roles/media/tasks/common.yaml index 3062762..73ea98f 100644 --- a/ansible/roles/media/tasks/common.yaml +++ b/ansible/roles/media/tasks/common.yaml @@ -15,6 +15,7 @@ state: present - include_tasks: "tasks/{{graphics_driver}}.yaml" + when: install_graphics # TODO: Maybe this should be when graphics_driver is defined to support headless casting - import_tasks: tasks/freebsd.yaml when: 'os_flavor == "freebsd"' diff --git a/ansible/roles/media/tasks/peruser.yaml b/ansible/roles/media/tasks/peruser.yaml index d48fda3..98b342c 100644 --- a/ansible/roles/media/tasks/peruser.yaml +++ b/ansible/roles/media/tasks/peruser.yaml @@ -2,6 +2,7 @@ name: per_user - name: Create directories + when: install_graphics file: name: "{{ account_homedir.stdout }}/{{ item }}" state: directory @@ -12,6 +13,7 @@ - ".config/mpv" - name: Copy files + when: install_graphics copy: src: "files/{{ item.src }}" dest: "{{ account_homedir.stdout }}/{{ item.dest }}"