mirror of
https://github.com/ansible/awx-operator.git
synced 2026-03-26 21:33:14 +00:00
14 lines
503 B
YAML
14 lines
503 B
YAML
---
|
|
- name: Check for presence of Deployment
|
|
k8s_info:
|
|
api_version: apps/v1
|
|
kind: Deployment
|
|
name: "{{ ansible_operator_meta.name }}"
|
|
namespace: "{{ ansible_operator_meta.namespace }}"
|
|
register: tower_deployment
|
|
|
|
# Just execute deployment steps when auto_upgrade is true or when no deployment exists
|
|
- name: Start installation
|
|
include_tasks: install.yml
|
|
when: (tower_deployment['resources'] | length > 0 and auto_upgrade | bool ) or (tower_deployment['resources'] | length == 0)
|