[crowdsec] feat: moved crowdsec to its own role

This commit is contained in:
Simon Cornet 2024-12-07 21:52:28 +01:00
commit 6c810044fb
3 changed files with 0 additions and 63 deletions

View file

@ -11,7 +11,6 @@ This role manages the build-in 'core' Operating System components and defaults t
# Tags # Tags
- apt - apt
- cron - cron
- crowdsec
- environment-file - environment-file
- hostname - hostname
- firewall - firewall

View file

@ -1,52 +0,0 @@
---
# 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 - debian
- name: "install crowdsec firewall bouncer - debian"
ansible.builtin.apt:
name: "crowdsec-firewall-bouncer"
state: "present"
cache_valid_time: "120"
when: 'ansible_distribution == "Debian"'
tags:
- "crowdsec"
# install crowdsec firewall bouncer - ubuntu
- name: "install crowdsec firewall bouncer - ubuntu"
ansible.builtin.apt:
name: "crowdsec-firewall-bouncer-iptables"
state: "present"
cache_valid_time: "120"
when: 'ansible_distribution == "Ubuntu"'
tags:
- "crowdsec"

View file

@ -6,7 +6,6 @@
tags: tags:
- "apt" - "apt"
- "cron" - "cron"
- "crowdsec"
- "environment-file" - "environment-file"
- "hostname" - "hostname"
- "firewall" - "firewall"
@ -33,7 +32,6 @@
tags: tags:
- "apt" - "apt"
- "cron" - "cron"
- "crowdsec"
- "environment-file" - "environment-file"
- "hostname" - "hostname"
- "firewall" - "firewall"
@ -271,14 +269,6 @@
when: "os_support" when: "os_support"
tags: "usermanagement" tags: "usermanagement"
# crowdsec
- name: "crowdsec security engine"
ansible.builtin.include_tasks: "crowdsec.yaml"
when:
- "os_support"
- "crowdsec_enable"
tags: "crowdsec"
# firewall # firewall
- name: "firewall" - name: "firewall"
ansible.builtin.import_tasks: "firewall/firewall-general.yaml" ansible.builtin.import_tasks: "firewall/firewall-general.yaml"