# vim: set ft=ansible
|
---
|
# Implement your Workload removal tasks here
|
- name: create usernames
|
set_fact:
|
users: "{{ users | default([]) + ['user'+item | string] }}"
|
loop: "{{ range(1,((num_users | int) + 1)) | list }}"
|
|
- name: remove the user Projects
|
k8s:
|
state: absent
|
name: "{{ item }}-project"
|
kind: Project
|
api_version: project.openshift.io/v1
|
with_list: "{{ users }}"
|
|
- name: remove the guides
|
k8s:
|
state: absent
|
name: "guides"
|
kind: Project
|
api_version: project.openshift.io/v1
|
|
# TODO delete CodeReady
|
- name: remove the CodeReady
|
k8s:
|
state: absent
|
name: "codeready"
|
kind: Project
|
api_version: project.openshift.io/v1
|
|
# Leave this as the last task in the playbook.
|
- name: remove_workload tasks complete
|
debug:
|
msg: "Remove Workload tasks completed successfully."
|
when: not silent|bool
|