diff --git a/tasks/add_bouncer.yml b/tasks/add_bouncer.yml index dc3a4d6..5638d0a 100644 --- a/tasks/add_bouncer.yml +++ b/tasks/add_bouncer.yml @@ -34,3 +34,9 @@ # notify: restart crowdsec-firewall-bouncer # loop_control: # label: "{{ item.regex }}" + +- name: Enable crowdsec firewall bouncer on boot + ansible.builtin.service: + name: crowdsec-firewall-bouncer + state: started + enabled: true diff --git a/tasks/main.yml b/tasks/main.yml index 1e551c2..2b20a18 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -82,6 +82,12 @@ when: crowdsec_whitelist.enabled notify: restart crowdsec + - name: Enable crowdsec on boot + ansible.builtin.service: + name: crowdsec + state: started + enabled: true + - name: Flush handlers to apply config ansible.builtin.meta: flush_handlers