This ansible roles installs Crowdsec incl. hub, collections, scenarios, postoverflows, parsers, bouncers and prometheus endpoint.
Tested on:
platforms:
- name: Ubuntu
versions:
- bionic #16.04
- focal #20.04
- impish #21.10
- name: Debian
versions:
- bookworm # 12
- bullseye # 11
- name: EL
versions:
- '8' #Rocky & alma Linux and Oracle Linux
- '7' #Oracle Linux
I use ansible-galaxy do make a requirements.yml
roles:
- geerlingguy.security
- alf149.crowdsec
And run
ansible-galaxy install -r requirements.yml
This wil import this role to your ansible projekt.
Available variables with default values (see defaults/main.yml
)
variables can be host specific in group_vars/host.yml
- hosts: all
vars:
ban_duration: "duration: 4h" # PROD eg. 10m for testing
roles:
- alf149.crowdsec
ansible HOST -m shell -a "sudo cscli parsers install crowdsecurity/whitelists --force" ansible 'group' -m shell -a "sudo cscli parsers remove crowdsecurity/whitelists --force" ansible 'group' -m shell -a "sudo systemctl reload crowdsec"
- Test on Windows server
- Maby autodetect nftables/iptables and load the correct bouncer.
Use github issues or make a PR.