mirror of
https://github.com/ansible/awx-operator.git
synced 2026-03-26 21:33:14 +00:00
- separating database_configuration and deployment tasks into separate files to add ability to call configuration independently
45 lines
1.3 KiB
YAML
45 lines
1.3 KiB
YAML
---
|
|
- name: Idle AWX
|
|
include_tasks: idle_deployment.yml
|
|
when: idle_deployment | bool
|
|
|
|
- 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)
|