summaryrefslogtreecommitdiff
path: root/roles/jail/templates
diff options
context:
space:
mode:
authorAlbert Cervin <albert@acervin.com>2023-03-19 17:18:01 +0100
committerAlbert Cervin <albert@acervin.com>2023-03-19 17:18:01 +0100
commitc6f2fd36e0a8188e1f6b2a15b292e3d0a5610ac4 (patch)
treed1c21cf0d9a2529154b33438bd91821268be5eb4 /roles/jail/templates
downloaddatagubbe-setup-main.tar.gz
datagubbe-setup-main.tar.xz
datagubbe-setup-main.zip
🎉 Initial commit of infraHEADmain
Diffstat (limited to 'roles/jail/templates')
-rw-r--r--roles/jail/templates/jail.conf.j218
1 files changed, 18 insertions, 0 deletions
diff --git a/roles/jail/templates/jail.conf.j2 b/roles/jail/templates/jail.conf.j2
new file mode 100644
index 0000000..0b55078
--- /dev/null
+++ b/roles/jail/templates/jail.conf.j2
@@ -0,0 +1,18 @@
+{{ jail.name }} {
+ exec.start = '/bin/sh /etc/rc';
+ exec.stop = '/bin/sh /etc/rc.shutdown jail';
+ mount.devfs;
+ host.hostname={{ jail.name }}.in.prison;
+ allow.raw_sockets;
+ allow.mount;
+ allow.mount.devfs;
+ allow.mount.zfs;
+ devfs_ruleset = 4;
+ enforce_statfs = 1;
+ ip6.addr='em0|{{ jail.ip }}';
+ path=/usr/local/jails/{{ jail.name }};
+
+ {% for dataset in jail.additional_data_sets | default([]) -%}
+ exec.poststart+="zfs jail ${name} poolen/jails/tank/{{ dataset }}";
+ {% endfor -%}
+}