add crowdsec role, move config logs site -> global, remove caddy_ca_root, modularized Caddy build and config
Some checks failed
Publish collection to Galaxy / publish (push) Failing after 42s
Some checks failed
Publish collection to Galaxy / publish (push) Failing after 42s
This commit is contained in:
19
seb4itik/byow/roles/caddy/tasks/caddy_crowdsec.yml
Normal file
19
seb4itik/byow/roles/caddy/tasks/caddy_crowdsec.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
- name: Get collections list
|
||||
ansible.builtin.shell:
|
||||
executable: "/usr/bin/bash"
|
||||
cmd: |
|
||||
set -o pipefail
|
||||
cscli collection list --output=json |jq -r '.collections[] |.name'
|
||||
register: "crowdsec_out_list_collections"
|
||||
changed_when: false
|
||||
|
||||
- name: Install collections
|
||||
loop:
|
||||
- "crowdsecurity/caddy"
|
||||
- "barnoux/caddy-coraza"
|
||||
when: "item not in crowdsec_out_list_collections.stdout_lines"
|
||||
ansible.builtin.command:
|
||||
cmd: "cscli collections install {{ item }}"
|
||||
changed_when: true
|
||||
notify:
|
||||
- "Restart Crowdsec Securiy Engine"
|
||||
Reference in New Issue
Block a user