feat: move to dedicated repo
This commit is contained in:
commit
4a88a5b28d
54 changed files with 1524 additions and 0 deletions
42
tasks/crowdsec.yaml
Normal file
42
tasks/crowdsec.yaml
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
---
|
||||
|
||||
# install crowdsec signing key
|
||||
- name: "install signing key"
|
||||
ansible.builtin.get_url:
|
||||
url: "https://packagecloud.io/crowdsec/crowdsec/gpgkey"
|
||||
dest: "/etc/apt/keyrings/crowdsec_crowdsec-archive-keyring.gpg"
|
||||
mode: "0644"
|
||||
register: "install_crowdsec_key"
|
||||
tags:
|
||||
- "crowdsec"
|
||||
|
||||
# update apt cache if required
|
||||
- name: "update apt cache"
|
||||
ansible.builtin.apt:
|
||||
update_cache: true
|
||||
when:
|
||||
- 'ansible_os_family == "Debian"'
|
||||
- "install_crowdsec_key.changed"
|
||||
tags:
|
||||
- "crowdsec"
|
||||
|
||||
# install crowdsec security engine
|
||||
- name: "install crowdsec security engine"
|
||||
ansible.builtin.apt:
|
||||
name: "crowdsec"
|
||||
state: "present"
|
||||
cache_valid_time: "120"
|
||||
when: 'ansible_os_family == "Debian"'
|
||||
register: "crowdsec_installed"
|
||||
tags:
|
||||
- "crowdsec"
|
||||
|
||||
# install crowdsec firewall bouncer
|
||||
- name: "install crowdsec firewall bouncer"
|
||||
ansible.builtin.apt:
|
||||
name: "crowdsec-firewall-bouncer"
|
||||
state: "present"
|
||||
cache_valid_time: "120"
|
||||
when: 'ansible_os_family == "Debian"'
|
||||
tags:
|
||||
- "crowdsec"
|
||||
Loading…
Add table
Add a link
Reference in a new issue