# note this is sample file location for centos7 # todo - check for centos8+ - name: clean-up config on redhat systems ansible.builtin.shell: executable: /bin/bash cmd: | cp -nv /usr/share/doc/sshguard-*/examples/sshguard.conf.sample /etc/sshguard.conf.dist grep -vE '^#|^$' /etc/sshguard.conf.dist > /etc/sshguard.conf.clean creates: /etc/sshguard.conf.clean - name: setup sshguard on redhat systems ansible.builtin.template: src: sshguard_redhat.yml dest: /etc/sshguard.conf diff: true notify: restart sshguard