-
Notifications
You must be signed in to change notification settings - Fork 2
/
delete-edgezookeeper.yaml
37 lines (37 loc) · 1.17 KB
/
delete-edgezookeeper.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
---
- name: Delete a EdgeZookeeper resource from OpenShift
hosts: localhost
connection: local
pre_tasks:
- fail:
msg: Variable crd_path is not defined
when: crd_path is not defined
- name: "Query EdgeZookeeper"
set_fact:
crd_complete: "{{ (lookup('file', crd_path) | from_yaml) }}"
vars:
ENTITY_TYPE: EdgeZookeeper
when: crd_path is defined
- name: "Set crd var"
set_fact:
crd: "{{ crd_complete.spec }}"
when: crd_path is defined
- name: "Set name var"
set_fact:
ansible_operator_meta_name: "{{ crd_complete.metadata.name }}"
when:
crd_path is defined and ansible_operator_meta_name is not defined
- name: "Set namespace var"
set_fact:
ansible_operator_meta_namespace: "{{ crd_complete.metadata.namespace }}"
when:
crd_path is defined and ansible_operator_meta_namespace is not defined
roles:
- smart-data-model-vars
- delete-edgezookeeper
vars:
ENTITY_TYPE: EdgeZookeeper
ansible_operator_meta:
name: "{{ ansible_operator_meta_name }}"
namespace: "{{ ansible_operator_meta_namespace }}"
verify_connections: false