Files
Aaron Guise d4366fef2a
Some checks failed
CI / lint (push) Failing after 2m15s
CI / release (push) Has been skipped
CI / notify (push) Has been skipped
feat: Initial Project 🎉
2024-08-20 11:11:35 +12:00

23 lines
536 B
YAML

---
# csf/handlers/main.yml
- name: run csftest.pl
command: /etc/csf/csftest.pl
register: csf_check_contents
changed_when: false
failed_when: csf_check_contents.stdout.find('csf should function on this server') == -1
when: ansible_facts.virtualization_type != 'docker'
# toremove when: statement ^
- name: check csf conf
command: csf -c
register: csf_conf_check
changed_when: false
failed_when: "'error' in csf_conf_check.stdout.lower()"
- name: restart csf
command: csf -ra
- name: enable csf
command: csf -e