forked from r3dact3d/OpenShift4-Ansible-Roles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.yaml
44 lines (40 loc) · 1.41 KB
/
main.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
42
43
44
---
- name: Run ansible playbook
hosts: localhost
vars:
manifests_dir: "{{ lookup('env','GITHUB_WORKSPACE') }}/manifests"
kubeconfig_path: "{{ lookup('env','KUBECONFIG') }}"
environment:
KUBECONFIG: "{{ kubeconfig_path }}"
pre_tasks:
- name: Create directory for all manifests
file:
path: "{{ manifests_dir }}"
state: directory
mode: 0775
- name: Get output from pip show openshift command
command: pip show openshift
ignore_errors: true
changed_when: false
register: reg_pip_module_openshift_installed
- name: Set fact for openshift module
set_fact:
pip_module_openshift_installed: "{{ reg_pip_module_openshift_installed.rc }}"
tasks:
- name: Include install_operators role
include_role:
name: install_operator
vars:
operator_name: "{{ operators_var.name }}"
operator_namespace: "{{ operators_var.namespace }}"
loop:
- {name: openshift-gitops-operator, namespace: openshift-operators}
- {name: dynatrace-operator, namespace: dynatrace}
- {name: compliance-operator, namespace: openshift-compliance}
- {name: serverless-operator, namespace: openshift-serverless}
- {name: mtc-operator, namespace: openshift-migration}
loop_control:
loop_var: operators_var
- name: Include day_2_ops role
include_role:
name: day_2_ops