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

Allow templating of jails/actions/filters #59

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

Conversation

simonspa
Copy link

@simonspa simonspa commented Nov 4, 2019

This PR allows templating of the jails etc by running the files through the Joinja2 templating engine. By this, local variables can directly be used in a jail, e.g.

my_data_dir = "/home/data"

in the jail:

[myjail]
backend = auto
enabled = true
port = 80,443
protocol = tcp
filter = myfilter
logpath = {{ my_data_dir }}/the.log

Furthermore, the new configuration parameters are lists of templates - which means not all jails/filters end up on all target hosts, but the inventory can be used to set specific jails/filters for specific target machines.

This currently breaks backwards compatibility - if this is of concern I can add the old behavior back in addition to the feature here.

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.

1 participant