-
Notifications
You must be signed in to change notification settings - Fork 2
/
apply-scorpiobroker.yaml
36 lines (36 loc) · 1.15 KB
/
apply-scorpiobroker.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
---
- name: Install a ScorpioBroker resource from OpenShift
hosts: localhost
connection: local
gather_facts: false
pre_tasks:
- fail:
msg: Variable crd_path is not defined
when: crd_path is not defined
- name: "Query ScorpioBroker"
set_fact:
crd_complete: "{{ (lookup('file', crd_path) | from_yaml) }}"
- 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
- apply-scorpiobroker
vars:
ENTITY_TYPE: ScorpioBroker
ansible_operator_meta:
name: "{{ ansible_operator_meta_name }}"
namespace: "{{ ansible_operator_meta_namespace }}"
verify_connections: false
enable_dev_nodeports: false