chore: activate kubernetes awx on dev/qa/prod

- config updates aren't possible without activation flag
- split axw config update into own playbook: awx.yml
qa
Sven Ketelsen 3 years ago
parent 808155f266
commit 4ae3845681

@ -0,0 +1,30 @@
---
# configuring awx cluster
- name: 'apply awx config update to {{ host | default("all") }}'
hosts: '{{ host | default("kube_control_plane") }}'
serial: "{{ serial_number | default(10) }}"
vars:
ansible_ssh_host: "{{ stage_server_domain }}"
pre_tasks:
- name: "Check if ansible version is at least {{ ansible_minimal_version }}"
assert:
that:
- ansible_version.string is version(ansible_minimal_version, ">=")
msg: "The ansible version has to be at least {{ ansible_minimal_version }}"
tags:
- always
- name: "Import autodiscover pre-tasks"
import_tasks: tasks/autodiscover_pre_tasks.yml
tags:
- always
roles:
- role: kubernetes/awx
when: kubernetes_with_awx | default(false)
tags:
- never # shouldn't be done automatically due to removal logic
- update_awx_config

@ -1,5 +1,6 @@
---
kubernetes_with_certmanager: true
kubernetes_with_externaldns: true
kubernetes_with_certmanager: true
kubernetes_with_ingress: true
kubernetes_with_awx: true

@ -111,10 +111,3 @@ custom_stage_plattform_users:
custom_stage_hetzner_ssh_keys:
- "ext.hans-peter.wissenbach@netgo.de"
kubernetes_with_prometheus: False
cert_manager_dplmt: False
kubernetes_with_certmanager: False
kubernetes_with_extdns: False
kubernetes_with_ingress: False
kubernetes_with_gitea: False

@ -1,6 +1,6 @@
---
kubernetes_with_certmanager: true
kubernetes_with_externaldns: true
kubernetes_with_certmanager: true
kubernetes_with_ingress: true
kubernetes_with_gitea: true

@ -1 +1,6 @@
---
kubernetes_with_externaldns: true
kubernetes_with_certmanager: true
kubernetes_with_ingress: true
kubernetes_with_awx: true

@ -1 +1,6 @@
---
kubernetes_with_externaldns: true
kubernetes_with_certmanager: true
kubernetes_with_ingress: true
kubernetes_with_awx: true

@ -1,5 +1,7 @@
---
# bootstraping kubernetes cluster
- name: 'apply kubernetes setup to {{ host | default("all") }}'
hosts: '{{ host | default("kube_control_plane") }}'
serial: "{{ serial_number | default(10) }}"
@ -62,8 +64,3 @@
when: kubernetes_with_bootstrap | default(true)
tags:
- bootstrap
- role: kubernetes/awx
when: kubernetes_with_awx | default(false)
tags:
- awx

@ -1,6 +1,6 @@
---
- name: "Checkin if awx in k8s cluster is avail"
- name: "Checkin if awx in k8s cluster is available"
delegate_to: localhost
uri:
url: "https://{{ shared_service_kube_awx_hostname }}/api/login"
@ -18,7 +18,8 @@
when:
- inventory_hostname == groups['kube_control_plane'][0]
tags:
- awx
- never # shouldn't be done automatically due to removal logic
- update_awx_config
- name: "Authenticating with awx server"
delegate_to: localhost
@ -33,15 +34,17 @@
status_code: 200
register: authentication_response
tags:
- awx
- never # shouldn't be done automatically due to removal logic
- update_awx_config
- name: DEBUG
debug:
msg: "{{ authentication_response }}"
tags:
- awx
when:
- debug
tags:
- never # shouldn't be done automatically due to removal logic
- update_awx_config
- name: "Configure some stuff"
include_tasks: awx-config.yml

Loading…
Cancel
Save