diff --git a/README.md b/README.md index 95282e4..ddd8f17 100644 --- a/README.md +++ b/README.md @@ -70,10 +70,14 @@ bastille: release: 13.0-RELEASE ip: 10.17.89.1 templates: - - "bastillebsd-templates/nginx" - template_args: - - user=root - - password=MYSUPERSECRETPASSWORD + - template: "yaazkal/bastille-postgres" + args: + - version=12 + - template: "yaazkal/bastille-matomo" + args: + - version=2 + - other=yes + - user=whatever - name: thickjail release: 13.0-RELEASE ip: 10.17.89.2 diff --git a/tasks/main.yml b/tasks/main.yml index 90bdaaf..cd601ad 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -114,6 +114,6 @@ when: bastille_jails is defined - name: "Apply templates to jails" - command: bastille template {{ item.name }} {{ item.templates | map('quote') | join(' ') }} {{ ['--arg'] | product(item.template_args | default([]) | map('quote')) | map('join', ' ') | join(' ') }} - loop: "{{ bastille_jails }}" + command: bastille template {{ item.0.name|quote }} {{ item.1.template|quote }} {{ ['--arg']|product(item.1.args|default([])|map('quote'))|map('join', ' ')|join(' ') }} + loop: "{{ bastille_jails | subelements('templates', skip_missing=True) }}" when: item.templates is defined