Moved what otherwise would've been handlers to task section to reduce complexity of implementation
This commit is contained in:
53
roles/bootstrap/tasks/configure_core/crowdsec.yml
Normal file
53
roles/bootstrap/tasks/configure_core/crowdsec.yml
Normal file
@@ -0,0 +1,53 @@
|
||||
---
|
||||
#@TODO write handlers for configuring crowdsec
|
||||
- name: Enroll your crowdsec installation
|
||||
become: yes
|
||||
become_method: sudo
|
||||
command:
|
||||
argv: [cscli, console, enroll -e, context, "{{ enrollment_key }}"]
|
||||
register: crowdsec_enrolled
|
||||
- name: Install caddy crowdsec collection
|
||||
become: yes
|
||||
become_method: sudo
|
||||
command:
|
||||
argv: [cscli, collections, install, crowdsecurity/caddy]
|
||||
- name: Install proftpd crowdsec collection
|
||||
become: yes
|
||||
become_method: sudo
|
||||
command:
|
||||
argv: [cscli, collections, install, crowdsecurity/proftpd]
|
||||
- name: Install sshd crowdsec collection
|
||||
become: yes
|
||||
become_method: sudo
|
||||
command:
|
||||
argv: [cscli, collections, install, crowdsecurity/sshd]
|
||||
- name: Install postgresql crowdsec collection
|
||||
become: yes
|
||||
become_method: sudo
|
||||
command:
|
||||
argv: [cscli, collections, install, crowdsecurity/pgsql]
|
||||
- name: Install denial-of-service HTTP crowdsec collection
|
||||
become: yes
|
||||
become_method: sudo
|
||||
command:
|
||||
argv: [cscli, collections, install, crowdsecurity/http-dos]
|
||||
- name: Install HTTP crowdsec collection
|
||||
become: yes
|
||||
become_method: sudo
|
||||
command:
|
||||
argv: [cscli, collections, install, crowdsecurity/base-http-scenarios]
|
||||
- name: Install Postfix crowdsec collection
|
||||
become: yes
|
||||
become_method: sudo
|
||||
command:
|
||||
argv: [cscli, collections, install, crowdsecurity/postfix]
|
||||
- name: Update crowdsec objects
|
||||
become: yes
|
||||
become_method: sudo
|
||||
command:
|
||||
argv: [cscli, hub, update]
|
||||
- name: Upgrade crowdsec objects
|
||||
become: yes
|
||||
become_method: sudo
|
||||
command:
|
||||
argv: [cscli, hub, upgrade]
|
Reference in New Issue
Block a user