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

Can we include multiple custom jail configuration files #17

Open
jlerbsc opened this issue Jan 9, 2017 · 2 comments
Open

Can we include multiple custom jail configuration files #17

jlerbsc opened this issue Jan 9, 2017 · 2 comments

Comments

@jlerbsc
Copy link

jlerbsc commented Jan 9, 2017

I would like to specify custom jail by server type. Is it possible to use this jails declaration to promote reuse?

with fail2ban-default.yml that contains specific rules for ssh jails
and fail2ban-nginx.yml that contains specific rules for nginx jails

 vars_files:
    - "{{inventory_dir}}/vars/fail2ban-nginx.yml"
    - "{{inventory_dir}}/vars/fail2ban-default.yml"
@drybjed
Copy link
Member

drybjed commented Jan 9, 2017

That depends on what Ansible does with the inventory variables - I imagine that if you use the same variable name in both files, the latter file will override the earlier one. So, not at the moment, but perhaps it will be easier to do in the future - I'm exploring a solution for this.

@jlerbsc
Copy link
Author

jlerbsc commented Jan 9, 2017

Thanks for the response.
These files contains fail2ban_jails and fail2ban_filters declarations which are, sometimes, specific for each component.

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

No branches or pull requests

2 participants