fixed bootstrap of chat jail, added rctl limit config stuff

This commit is contained in:
2024-12-15 18:48:41 +01:00
parent 862f2567b1
commit 7b60d8bf8c
10 changed files with 84 additions and 13 deletions

View File

@@ -74,7 +74,7 @@ args=""
root=""
if test -n "$rootdir"; then
root="-R $rootdir"
root="-R $rootdir -L jail"
fi
if test -n "$groups"; then

View File

@@ -51,7 +51,7 @@
template:
src: hosts.j2
dest: "/usr/local/bastille/templates/services/{{ role_name }}/etc/hosts"
- name: create jail
shell: "bastille create -B {{ role_name }} {{ release }} {{ jailip.stdout }}/64 bridge0"
args:
@@ -77,6 +77,15 @@
src: keys
dest: "/usr/local/bastille/"
# create our login class, needed for rctl rules
- name: create jail login class
shell: |
( echo "jail:\\"; printf "\t:tc=default:\n" ) >> /usr/local/bastille/jails/{{ role_name }}/root/etc/login.conf
cap_mkdb /usr/local/bastille/jails/{{ role_name }}/root/etc/login.conf
touch /tmp/.ansiblepubloginconf
args:
creates: /tmp/.ansiblepubloginconf
# create our own group[s]
- name: Manage groups
loop: "{{ jailgroups }}"