- name: check sshguard is installed, enabled and running on freebsd systems ansible.builtin.shell: executable: /bin/bash cmd: | pkg info | grep ^sshguard grep ^sshguard_enable= /etc/rc.conf ps aux | grep sshguard check_mode: false changed_when: false - name: setup sshguard on freebsd systems ansible.builtin.template: src: sshguard_freebsd.yml dest: /etc/sshguard.conf diff: true notify: restart sshguard