Fix crowdsec deployment on RedHat family version 7
Some checks reported errors
continuous-integration/drone/push Build encountered an error

This commit is contained in:
Adrien Reslinger 2022-12-16 09:29:33 +01:00
parent 2a48449792
commit 826c345aef
Signed by: adrien
GPG key ID: DA7B27055C66D6DE
2 changed files with 13 additions and 3 deletions

View file

@ -1,18 +1,28 @@
--- ---
- name: Install bouncer (currently only firewall) - name: Install Debian family crowdsec bouncer (iptables)
ansible.builtin.apt: ansible.builtin.apt:
name: name:
- crowdsec-firewall-bouncer-iptables - crowdsec-firewall-bouncer-iptables
when: when:
- ansible_os_family == "Debian" - ansible_os_family == "Debian"
- name: Install crowdsec - name: Install RedHat family crowdsec bouncer (iptables)
ansible.builtin.dnf:
name:
- crowdsec-firewall-bouncer-iptables
state: present
when:
- ansible_os_family == "RedHat"
- ansible_distribution_major_version <= '7'
- name: Install RedHat family crowdsec bouncer (nftables)
ansible.builtin.dnf: ansible.builtin.dnf:
name: name:
- crowdsec-firewall-bouncer-nftables - crowdsec-firewall-bouncer-nftables
state: present state: present
when: when:
- ansible_os_family == "RedHat" - ansible_os_family == "RedHat"
- ansible_distribution_major_version > '7'
# - name: Register new bouncer # - name: Register new bouncer
# ansible.builtin.command: cscli bouncers add {{ inventory_hostname }} -o raw # ansible.builtin.command: cscli bouncers add {{ inventory_hostname }} -o raw

View file

@ -57,7 +57,7 @@ api:
# key_file: /etc/crowdsec/ssl/key.pem # key_file: /etc/crowdsec/ssl/key.pem
{% endif %} {% endif %}
prometheus: prometheus:
enabled: {{ crowdsec_prometheus.enabled }} enabled: {{ crowdsec_prometheus.enabled | lower }}
level: full level: full
listen_addr: 127.0.0.1 listen_addr: 127.0.0.1
listen_port: 6060 listen_port: 6060