From 2a48449792d3a50f030252f845c8ee425751d1ce Mon Sep 17 00:00:00 2001 From: Adrien Reslinger Date: Sat, 15 Oct 2022 12:07:16 +0200 Subject: [PATCH] Fix services enabled issues --- tasks/add_bouncer.yml | 6 ++++++ tasks/main.yml | 6 ++++++ 2 files changed, 12 insertions(+) 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