mirror of
https://github.com/ansible/awx-operator.git
synced 2026-03-26 21:33:14 +00:00
29 lines
658 B
YAML
29 lines
658 B
YAML
---
|
|
|
|
- name: Get AWX custom resource object
|
|
k8s_info:
|
|
version: v1beta1
|
|
kind: AWX
|
|
namespace: '{{ meta.namespace }}'
|
|
name: '{{ deployment_name }}'
|
|
register: _awx_cro
|
|
|
|
- name: Set AWX object
|
|
set_fact:
|
|
_awx: "{{ _awx_cro['resources'][0] }}"
|
|
|
|
- name: Set user specified spec
|
|
set_fact:
|
|
awx_spec: "{{ _awx['spec'] }}"
|
|
|
|
- name: Template secrets into yaml
|
|
set_fact:
|
|
awx_definition_file: "{{ awx_spec }}"
|
|
|
|
- name: Write awx object to pvc
|
|
k8s_exec:
|
|
namespace: "{{ backup_pvc_namespace }}"
|
|
pod: "{{ meta.name }}-db-management"
|
|
command: >-
|
|
bash -c "echo '{{ awx_definition_file }}' > {{ backup_dir }}/awx_object"
|