Gareth Healy
2020-02-27 05c8bb4cc58868ff0eaf866dc774dd5149bc9f77
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
---
- name: Get Fuse template
  uri:
    url: "https://{{ gitea_route.stdout }}/{{ _namespace }}/proactive-fraud-detection-fuse/raw/branch/master/.openshiftio/application.yaml"
    method: GET
    body_format: json
    validate_certs: false
    return_content: true
  register: fusetemplate
 
- name: Process Fuse workload template
  command: >
    oc process -p SOURCE_REPOSITORY_URL=http://mygitea.gitea.svc.cluster.local:3000/{{ _namespace }}/proactive-fraud-detection-fuse.git -p KAFKA_BROKERS={{ _namespace }}-cluster-kafka-brokers:9092 -f -
  args:
    stdin: "{{ fusetemplate.content | string }}"
  register: fusework
 
- name: Create Fuse workload
  k8s:
    state: present
    namespace: "{{ _namespace }}"
    definition: "{{ fusework.stdout | from_json }}"