mirror of
https://github.com/ansible/awx-operator.git
synced 2026-05-07 22:02:53 +00:00
Update CSV with richer fields
This commit is contained in:
@@ -40,12 +40,3 @@
|
||||
- name: Store admin password
|
||||
set_fact:
|
||||
tower_admin_password: "{{ admin_password_secret['resources'][0]['data']['password'] | b64decode }}"
|
||||
|
||||
- name: Set admin password secret status
|
||||
operator_sdk.util.k8s_status:
|
||||
api_version: awx.ansible.com/v1beta1
|
||||
kind: "{{ deployment_type | upper }}"
|
||||
name: "{{ meta.name }}"
|
||||
namespace: "{{ meta.namespace }}"
|
||||
status:
|
||||
towerAdminPasswordSecret: "{{ admin_password_secret['resources'][0]['metadata']['name'] }}"
|
||||
|
||||
@@ -68,3 +68,6 @@
|
||||
when: (k8s_defs_result is changed) or (database_check is defined and database_check.return_code != 0)
|
||||
|
||||
- include_tasks: initialize.yml
|
||||
|
||||
- name: Update status variables
|
||||
include_tasks: update_status.yml
|
||||
|
||||
56
roles/installer/tasks/update_status.yml
Normal file
56
roles/installer/tasks/update_status.yml
Normal file
@@ -0,0 +1,56 @@
|
||||
---
|
||||
- name: Update admin password status
|
||||
operator_sdk.util.k8s_status:
|
||||
api_version: awx.ansible.com/v1beta1
|
||||
kind: "{{ deployment_type | upper }}"
|
||||
name: "{{ meta.name }}"
|
||||
namespace: "{{ meta.namespace }}"
|
||||
status:
|
||||
towerAdminPasswordSecret: "{{ admin_password_secret['resources'][0]['metadata']['name'] }}"
|
||||
|
||||
- name: Update admin user status
|
||||
operator_sdk.util.k8s_status:
|
||||
api_version: awx.ansible.com/v1beta1
|
||||
kind: "{{ deployment_type | upper }}"
|
||||
name: "{{ meta.name }}"
|
||||
namespace: "{{ meta.namespace }}"
|
||||
status:
|
||||
towerAdminUser: "{{ tower_admin_user }}"
|
||||
|
||||
- name: Retrieve instance version
|
||||
community.kubernetes.k8s_exec:
|
||||
namespace: "{{ meta.namespace }}"
|
||||
pod: "{{ tower_pod_name }}"
|
||||
container: "{{ meta.name }}-task"
|
||||
command: >-
|
||||
bash -c "awx-manage --version"
|
||||
register: instance_version
|
||||
changed_when: false
|
||||
|
||||
- name: Update version status
|
||||
operator_sdk.util.k8s_status:
|
||||
api_version: awx.ansible.com/v1beta1
|
||||
kind: "{{ deployment_type | upper }}"
|
||||
name: "{{ meta.name }}"
|
||||
namespace: "{{ meta.namespace }}"
|
||||
status:
|
||||
towerVersion: "{{ instance_version.stdout }}"
|
||||
|
||||
- block:
|
||||
- name: Retrieve route URL
|
||||
community.kubernetes.k8s_info:
|
||||
kind: Route
|
||||
namespace: '{{ meta.namespace }}'
|
||||
name: '{{ meta.name }}'
|
||||
register: route_url
|
||||
|
||||
- name: Update URL status
|
||||
operator_sdk.util.k8s_status:
|
||||
api_version: awx.ansible.com/v1beta1
|
||||
kind: "{{ deployment_type | upper }}"
|
||||
name: "{{ meta.name }}"
|
||||
namespace: "{{ meta.namespace }}"
|
||||
status:
|
||||
towerURL: "https://{{ route_url['resources'][0]['status']['ingress'][0]['host'] }}"
|
||||
|
||||
when: tower_ingress_type | lower == 'route'
|
||||
Reference in New Issue
Block a user