aboutsummaryrefslogtreecommitdiffstats
path: root/tasks/jails.yml
diff options
context:
space:
mode:
authorJan Tuomi <jan@jantuomi.fi>2025-07-25 00:09:01 +0300
committerJan Tuomi <jan@jantuomi.fi>2025-09-26 16:14:53 +0200
commitcc1b02f99e457d2a5a440698e9bae1ca30f408e1 (patch)
treed26b3086697996b27f9e459cadcf195adc60eebb /tasks/jails.yml
parentd1c9aa40ccb5910076d0ec94843efccf62ee006a (diff)
Initial impl of vnet jails
Diffstat (limited to 'tasks/jails.yml')
-rw-r--r--tasks/jails.yml20
1 files changed, 14 insertions, 6 deletions
diff --git a/tasks/jails.yml b/tasks/jails.yml
index 8233dc5..7cbe707 100644
--- a/tasks/jails.yml
+++ b/tasks/jails.yml
@@ -37,18 +37,23 @@
- name: Unarchive userland
shell: tar -xzf /usr/local/jails/media/{{ jail_userland_version }}-base.txz -C /usr/local/jails/templates/{{ jail_userland_version }}
- - name: Copy localtime and resolv.conf to jail userland
+ - name: Copy localtime to jail userland
copy:
remote_src: true
- src: "{{ item }}"
- dest: "/usr/local/jails/templates/{{ jail_userland_version }}{{ item }}"
- loop:
- - /etc/resolv.conf
- - /etc/localtime
+ src: /etc/localtime
+ dest: /usr/local/jails/templates/{{ jail_userland_version }}/etc/localtime
+
+ - name: Copy resolv.conf to jail userland
+ shell: |
+ cat /etc/resolv.conf > /usr/local/jails/templates/{{ jail_userland_version }}/etc/resolv.conf
+ chmod 644 /usr/local/jails/templates/{{ jail_userland_version }}/etc/resolv.conf
- name: Update userland to latest patch level
shell: freebsd-update -b /usr/local/jails/templates/{{ jail_userland_version }}/ fetch install
+ - name: Disable syslogd in the template
+ shell: echo 'syslogd_enable="NO"' >> /usr/local/jails/templates/{{ jail_userland_version }}/etc/rc.conf
+
- name: Create userland ZFS snapshot
shell: zfs snapshot zroot/jails/templates/{{ jail_userland_version }}@base
@@ -67,3 +72,6 @@
loop_control:
loop_var: jail
include_tasks: jail_single.yml
+
+- name: Configure ingress jail
+ include_tasks: jail_ingress.yml