Fix haproxy problem

This commit is contained in:
Dryusdan 2024-04-26 13:38:37 +02:00
parent 656e23e878
commit 7fa3250d93
3 changed files with 4 additions and 3 deletions

View file

@ -112,14 +112,14 @@
- configure
- name: "Add Dryusdan's configuration"
copy:
ansible.builtin.copy:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
owner: root
group: root
mode: '0640'
loop:
- { 'src': 'customs/scnearios/dryusdan-ssh-bf.yml', 'dest':'/etc/crowdsec/scenarios/dryusdan-ssh-bf.yaml' }
- { 'src': 'customs/scenarios/dryusdan-ssh-bf.yml', 'dest':'/etc/crowdsec/scenarios/dryusdan-ssh-bf.yaml' }
notify: crowdsec-reload
tags:
- configure

View file

@ -22,10 +22,10 @@
- name: Register bouncer on LAPI
ansible.builtin.shell: "cscli bouncers add haproxy_{{ ansible_fqdn }} -o raw "
register: api_key
when: bouncers_status.rc == 1
delegate_to: "{{ crowdsec_lapi_server }}"
when:
- crowdsec_haproxy
- bouncers_status.rc == 1
tags:
- haproxy-plugin

View file

@ -1,4 +1,5 @@
API_KEY={{ api_key_str }}
MAP_PATH=/var/lib/crowdsec/lua/haproxy/community_blocklist.map
# bounce for all type of remediation that the bouncer can receive from the local API
BOUNCING_ON_TYPE={{ crowdsec_haproxy_bouncing_type | default('all') }}
# when the bouncer receive an unknown remediation, fallback to this remediation