Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provides optional args to a Bastille template #2

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

psmet-dev
Copy link

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.

@yaazkal
Copy link
Owner

yaazkal commented Aug 26, 2021

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.

@psmet-dev
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants