Gareth Healy
2020-02-10 16f23bf871020f763ae1be4ab1ecd92da8131516
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
---
- name: Get Fuse template
  uri:
    url: "https://{{ gitea_route.stdout }}/gitadmin/pam-fraudmanagement/raw/branch/master/fuse/.openshiftio/application.yaml"
    method: GET
    body_format: json
    validate_certs: false
    return_content: true
  register: fusetemplate
 
- name: Process Fuse workload template
  command: >
    oc process -f -
  args:
    stdin: "{{ fusetemplate.content | string }}"
  register: fusework
 
- name: Create Fuse workload
  k8s:
    state: present
    namespace: "{{ _namespace }}"
    definition: "{{ fusework.stdout | from_json }}"
 
- name: Start and follow Fuse workload build
  command: >
    oc start-build BuildConfig/pam-fraudmanagement-fuse --wait -n "{{ _namespace }}"
 
#- name: Check Fuse workload is running
#  command: >
#    oc rollout status DeploymentConfig/pam-fraudmanagement-fuse --watch=true -n "{{ _namespace }}"
 
- name: todo
  debug:
    msg: "TODO: the workload needs to be told the kafka client svc, so the application.props can be a configmap/dynamic - once thats done, re-add above"