Skip to content

Commit 28a2903

Browse files
committed
crowdsec: reorder install/remove tasks
1 parent da0a418 commit 28a2903

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

roles/crowdsec/tasks/main.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -81,36 +81,36 @@
8181
loop: "{{ crowdsec_collections_install }}"
8282
when: (crowdsec_collections_install | length > 0)
8383

84-
- name: Remove collections
85-
ansible.builtin.shell: "cscli collections remove {{ item }} --force"
86-
loop: "{{ crowdsec_collections_remove }}"
87-
when: (crowdsec_collections_remove | length > 0)
88-
8984
- name: Install scenarios
9085
ansible.builtin.shell: "cscli scenarios install {{ item }} --force"
9186
loop: "{{ crowdsec_scenarios_install }}"
9287
when: (crowdsec_scenarios_install | length > 0)
9388

94-
- name: Remove scenarios
95-
ansible.builtin.shell: "cscli scenarios remove {{ item }} --force"
96-
loop: "{{ crowdsec_scenarios_remove }}"
97-
when: (crowdsec_scenarios_remove | length > 0)
98-
9989
- name: Install parsers
10090
ansible.builtin.shell: "cscli parsers install {{ item }} --force"
10191
loop: "{{ crowdsec_parsers_install }}"
10292
when: (crowdsec_parsers_install | length > 0)
10393

104-
- name: Remove parsers
105-
ansible.builtin.shell: "cscli parsers remove {{ item }} --force"
106-
loop: "{{ crowdsec_parsers_remove }}"
107-
when: (crowdsec_parsers_remove | length > 0)
108-
10994
- name: Install postoverflows
11095
ansible.builtin.shell: "cscli postoverflows install {{ item }} --force"
11196
loop: "{{ crowdsec_postoverflows_install }}"
11297
when: (crowdsec_postoverflows_install | length > 0)
11398

99+
- name: Remove collections
100+
ansible.builtin.shell: "cscli collections remove {{ item }} --force"
101+
loop: "{{ crowdsec_collections_remove }}"
102+
when: (crowdsec_collections_remove | length > 0)
103+
104+
- name: Remove scenarios
105+
ansible.builtin.shell: "cscli scenarios remove {{ item }} --force"
106+
loop: "{{ crowdsec_scenarios_remove }}"
107+
when: (crowdsec_scenarios_remove | length > 0)
108+
109+
- name: Remove parsers
110+
ansible.builtin.shell: "cscli parsers remove {{ item }} --force"
111+
loop: "{{ crowdsec_parsers_remove }}"
112+
when: (crowdsec_parsers_remove | length > 0)
113+
114114
- name: Remove postoverflows
115115
ansible.builtin.shell: "sudo cscli postoverflows remove {{ item }} --force"
116116
loop: "{{ crowdsec_postoverflows_remove }}"

0 commit comments

Comments
 (0)