You've already forked ansible-role-csf
feat: Initial Project 🎉
This commit is contained in:
22
handlers/main.yml
Normal file
22
handlers/main.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
# 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
|
||||
Reference in New Issue
Block a user