Skip to content
Snippets Groups Projects
Verified Commit a86a9c96 authored by Chris Croome's avatar Chris Croome
Browse files

fix #5

parent 50773485
No related branches found
No related tags found
No related merge requests found
Pipeline #30839 failed
......@@ -28,6 +28,24 @@
state: present
notify: Restart fail2ban
- name: Debug log files to be touched
ansible.builtin.debug:
var: fail2ban_logpath
loop: "{{ fail2ban_config_files | community.general.json_query('[].conf.*.logpath|[][]') }}"
loop_control:
loop_var: fail2ban_logpath
- name: Touch log files # noqa: risky-file-permissions
ansible.builtin.file:
path: "{{ fail2ban_logpath }}"
state: touch
access_time: preserve
modification_time: preserve
loop: "{{ fail2ban_config_files | community.general.json_query('[].conf.*.logpath|[][]') }}"
loop_control:
loop_var: fail2ban_logpath
when: fail2ban_config_files | community.general.json_query('[].conf.*.logpath|[][]') != []
- name: Filters in place
ansible.builtin.copy:
src: "files/filter.d/{{ fail2ban_filter }}.conf"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment