Wolfgang Kulhanek
2019-07-26 a637ad2e8670d280f31747137eb40697ffa2cbad
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
---
# Implement your Workload deployment tasks here
 
- name: Setting up workload for user
  debug:
    msg: "Setting up workload for user ocp_username = {{ ocp_username }}"
 
- name: Debug stuff
  debug:
    msg: "Pull secret: {{ _quay_dockerconfigjson }}"
 
- name: Create OpenShift Objects for Red Hat Quay Registry
  k8s:
    state: present
    merge_type:
    - strategic-merge
    - merge
    definition: "{{ lookup('template', item ) | from_yaml }}"
  loop:
  - ./templates/project.j2
  - ./templates/crd.j2
  - ./templates/service_account.j2
  - ./templates/cluster_role.j2
  - ./templates/cluster_role_binding.j2
  - ./templates/role.j2
  - ./templates/role_binding.j2
  - ./templates/operator.j2
  - ./templates/pull_secret.j2
  - ./templates/quay.j2
 
# Leave this as the last task in the playbook.
- name: workload tasks complete
  debug:
    msg: "Workload Tasks completed successfully."
  when: not silent|bool