Gareth Healy
2020-02-13 ddd690da5b82beeed683b6c5455e008b32e18cbd
commit | author | age
2282af 1 ---
GH 2 # Implement your Workload removal tasks here
3 - name: Fail if _namespace defined
4   fail:
5     msg: _namespace var is defined. didnt expect that
6   when: _namespace is defined
7
8 - name: Fail if user count incorrect
9   fail:
10     msg: User count end({{ user_count_end }}) <= user count start ({{ user_count_start }})
11   when: user_count_end|int <= user_count_start|int
12
16f23b 13 - name: Delete project for cluster operators
GH 14   command: >
15     oc delete project {{ item }}
16   with_items:
17     - "amq-streams"
18     - "codeready-workspaces"
ddd690 19     - "gitea"
16f23b 20   ignore_errors: yes
GH 21
2282af 22 - name: Delete projects loop
GH 23   include_tasks: remove_workload_per_project.yml
24   loop: "{{ range(user_count_start|int, user_count_end|int)|list }}"
25   loop_control:
26     loop_var: user_num
27
28 # Leave this as the last task in the playbook.
29 - name: remove_workload tasks complete
30   debug:
31     msg: "Remove Workload tasks completed successfully."
32   when: not silent|bool