Consolidate OpenShift and Kubernetes roles

Signed-off-by: Shane McDonald <me@shanemcd.com>
This commit is contained in:
Shane McDonald
2018-03-27 19:45:59 -04:00
parent 7002c6f1b1
commit 98f5dc3fcc
11 changed files with 144 additions and 521 deletions

View File

@@ -0,0 +1,16 @@
- name: Set the Kubernetes Context
shell: "kubectl config set-context {{ kubernetes_context }}"
- name: Get Namespace Detail
shell: "kubectl get namespace {{ awx_kubernetes_namespace }}"
register: namespace_details
ignore_errors: yes
- name: Create AWX Kubernetes Project
shell: "kubectl create namespace {{ awx_kubernetes_namespace }}"
when: namespace_details.rc != 0
- name: Set postgresql service name
set_fact:
postgresql_service_name: "{{ awx_kubernetes_namespace }}-postgresql"
when: "pg_hostname is not defined or pg_hostname == ''"