--- # The log file a service jail watches must exist, or `fail2ban-client -t` fails. - name: Prepare hosts: all gather_facts: false tasks: - name: Create the log file the logpath jail watches ansible.builtin.file: path: /var/log/svc-a.log state: touch mode: "0644" access_time: preserve modification_time: preserve