Files
sukaato-ansible/roles/bootstrap/tasks/configure_core/crowdsec.yml

53 lines
1.5 KiB
YAML

---
#@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]