Skip to content

Commit

Permalink
Add the possibility to provide args to a Bastille template
Browse files Browse the repository at this point in the history
  • Loading branch information
psmet-dev committed Aug 26, 2021
1 parent b39f8fa commit 8900ce5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ bastille:
ip: 10.17.89.1
templates:
- "bastillebsd-templates/nginx"
template_args:
- user=root
- password=MYSUPERSECRETPASSWORD
- name: thickjail
release: 13.0-RELEASE
ip: 10.17.89.2
Expand Down
8 changes: 3 additions & 5 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,6 @@
when: bastille_jails is defined

- name: "Apply templates to jails"
command: bastille template "{{ item.0.name }}" "{{ item.1 }}"
with_subelements:
- "{{ bastille_jails }}"
- templates
- skip_missing: yes
command: bastille template {{ item.name }} {{ item.templates | map('quote') | join(' ') }} {{ ['--arg'] | product(item.template_args | default([]) | map('quote')) | map('join', ' ') | join(' ') }}
loop: "{{ bastille_jails }}"
when: item.templates is defined

0 comments on commit 8900ce5

Please sign in to comment.