mirror of
https://github.com/ansible/awx-operator.git
synced 2026-03-26 21:33:14 +00:00
48 lines
1.3 KiB
YAML
48 lines
1.3 KiB
YAML
---
|
|
- name: Patching labels to {{ kind }} kind
|
|
k8s:
|
|
state: present
|
|
definition:
|
|
apiVersion: '{{ api_version }}'
|
|
kind: '{{ kind }}'
|
|
name: '{{ meta.name }}'
|
|
namespace: '{{ meta.namespace }}'
|
|
metadata:
|
|
name: '{{ meta.name }}'
|
|
namespace: '{{ meta.namespace }}'
|
|
labels:
|
|
app.kubernetes.io/name: '{{ meta.name }}'
|
|
app.kubernetes.io/part-of: '{{ meta.name }}'
|
|
app.kubernetes.io/managed-by: '{{ deployment_type }}-operator'
|
|
app.kubernetes.io/component: '{{ deployment_type }}'
|
|
app.kubernetes.io/operator-version: '{{ lookup("env", "OPERATOR_VERSION") }}'
|
|
|
|
- name: Look up details for this restore object
|
|
k8s_info:
|
|
api_version: "{{ api_version }}"
|
|
kind: "{{ kind }}"
|
|
name: "{{ meta.name }}"
|
|
namespace: "{{ meta.namespace }}"
|
|
register: this_restore
|
|
|
|
- block:
|
|
- include_tasks: init.yml
|
|
|
|
- include_tasks: secrets.yml
|
|
|
|
- include_tasks: deploy_awx.yml
|
|
|
|
- include_tasks: postgres.yml
|
|
|
|
- name: Set flag signifying this restore was successful
|
|
set_fact:
|
|
tower_restore_complete: True
|
|
|
|
- include_tasks: cleanup.yml
|
|
|
|
when:
|
|
- this_restore['resources'][0]['status']['restoreComplete'] is not defined
|
|
|
|
- name: Update status variables
|
|
include_tasks: update_status.yml
|