-
Notifications
You must be signed in to change notification settings - Fork 2
/
apply-edgemongodb.yaml
41 lines (41 loc) · 1.29 KB
/
apply-edgemongodb.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
38
39
40
41
---
- name: Install a EdgeMongoDB 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 EdgeMongoDB"
set_fact:
crd_complete: "{{ (lookup('file', crd_path) | from_yaml) }}"
vars:
ENTITY_TYPE: EdgeMongoDB
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
- apply-edgemongodb
vars:
ENTITY_TYPE: EdgeMongoDB
ansible_operator_meta:
name: "{{ ansible_operator_meta_name }}"
namespace: "{{ ansible_operator_meta_namespace }}"
mqtt_nodeport: 30083
mqtt_nodeport_hostname: mqtt.apps-crc.testing
verify_connections: false
enable_dev_nodeports: false