mirror of
https://github.com/ansible/awx-operator.git
synced 2026-05-06 21:32:52 +00:00
* Compare gating version against existing deployment versions and set upgradeFrom status * Add quotes to default version Co-authored-by: Dimitri Savineau <savineau.dimitri@gmail.com>
41 lines
1.2 KiB
YAML
41 lines
1.2 KiB
YAML
---
|
|
- name: Check for presence of old awx Deployment
|
|
k8s_info:
|
|
api_version: apps/v1
|
|
kind: Deployment
|
|
name: "{{ ansible_operator_meta.name }}"
|
|
namespace: "{{ ansible_operator_meta.namespace }}"
|
|
register: awx_deployment
|
|
|
|
- name: Check for presence of awx-task Deployment
|
|
k8s_info:
|
|
api_version: apps/v1
|
|
kind: Deployment
|
|
name: "{{ ansible_operator_meta.name }}-task"
|
|
namespace: "{{ ansible_operator_meta.namespace }}"
|
|
register: awx_task_deployment
|
|
|
|
- name: Check for presence of awx-web Deployment
|
|
k8s_info:
|
|
api_version: apps/v1
|
|
kind: Deployment
|
|
name: "{{ ansible_operator_meta.name }}-web"
|
|
namespace: "{{ ansible_operator_meta.namespace }}"
|
|
register: awx_web_deployment
|
|
|
|
- name: Check for existing deployment for previous version
|
|
include_tasks: check_existing.yml
|
|
when: gating_version | length
|
|
|
|
- name: Start installation if auto_upgrade is true
|
|
include_tasks: install.yml
|
|
when:
|
|
- auto_upgrade | bool
|
|
|
|
- name: Start installation if auto_upgrade is false and deployment is missing
|
|
include_tasks: install.yml
|
|
when:
|
|
- not (auto_upgrade | bool)
|
|
- not (awx_deployment['resources'] | length > 0)
|
|
- not (awx_web_deployment['resources'] | length > 0 and awx_task_deployment['resources'] | length > 0)
|