diff options
Diffstat (limited to 'ansible/project/setup_jail.yaml')
| -rw-r--r-- | ansible/project/setup_jail.yaml | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ansible/project/setup_jail.yaml b/ansible/project/setup_jail.yaml new file mode 100644 index 0000000..58a3c99 --- /dev/null +++ b/ansible/project/setup_jail.yaml @@ -0,0 +1,15 @@ +- hosts: bsd_servers + tasks: + - name: setup jail + become: true + when: inventory_hostname == jail_host + block: + - name: install packages inside jail + community.general.pkgng: + name: "{{ jail_packages }}" + state: present + jail: "{{ jail_name }}" + + - name: run commands inside jail + ansible.builtin.shell: "jexec -u root {{ jail_name }} {{ item }}" + with_items: "{{ jail_commands }}" |
