diff options
| author | Panu Oksiala <panu@oksiala.fi> | 2024-01-22 00:24:37 +0200 |
|---|---|---|
| committer | Panu Oksiala <panu@oksiala.fi> | 2024-01-22 00:24:37 +0200 |
| commit | 73c1115e6fba24b86eca1e5cad5f5086d6bd2ba6 (patch) | |
| tree | daedbc44f41c91a13cb7fc26edd325ab14996217 /ansible/project/setup_jail.yaml | |
Initial commit
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 }}" |
