ansible-role-bastille
ansible-role-bastille copied to clipboard
Provides optional args to a Bastille template
As template command allows to parse args from the command line, this would give the possibility to provide values from ansible to configure the jail.
Thanks so much for the PR.
This is definitively a planned feature. As args are per template, its implementation needs to reflect that. So I was thinking the structure like this (ideas are welcome):
bastille_jails:
- name: defaultjail
release: 13.0-RELEASE
ip: 10.17.89.1
templates:
- template: "yaazkal/bastille-postgres"
args:
- version: 12
- template: "yaazkal/bastille-matomo"
args:
- version: 2
- other: yes
- user: whatever
Edit: I need to check if the word args con be used in this context due to ansible args, but I hope it clarifies the idea.
I've made some changes based on your proposal which is indeed better. Each template should now be applied separately with its own args. I've kept the args as strings as I didn't find how to convert an array of items to a string while already in a loop.