mirror of
https://github.com/ansible/awx-operator.git
synced 2026-03-27 05:43:11 +00:00
Fix rebase issue & remove dynamic kind/version var setting
This commit is contained in:
@@ -572,6 +572,7 @@ rules:
|
||||
- apps
|
||||
resources:
|
||||
- deployments/scale
|
||||
- statefulsets/scale
|
||||
verbs:
|
||||
- patch
|
||||
- apiGroups:
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
---
|
||||
# Required: specify name of tower deployment to backup from
|
||||
deployment_name: ''
|
||||
kind: 'AWXBackup'
|
||||
api_version: '{{ deployment_type }}.ansible.com/v1beta1'
|
||||
|
||||
# Specify a pre-created PVC (name) to backup to
|
||||
backup_pvc: ''
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
---
|
||||
|
||||
- name: Set apiVersion and kind variables
|
||||
set_fact:
|
||||
api_version: '{{ hostvars["localhost"]["inventory_file"].split("/")[4:6] | join("/") }}'
|
||||
kind: '{{ hostvars["localhost"]["inventory_file"].split("/")[6] }}'
|
||||
|
||||
- name: Determine the timestamp
|
||||
set_fact:
|
||||
now: '{{ lookup("pipe", "date +%FT%TZ") }}'
|
||||
|
||||
@@ -60,15 +60,10 @@
|
||||
template: "management-pod.yml.j2"
|
||||
wait: true
|
||||
|
||||
# Retrieve AWX object for use in postgres.yml and secrets.yml
|
||||
- name: Set apiVersion and kind variables
|
||||
set_fact:
|
||||
api_version: '{{ hostvars["localhost"]["inventory_file"].split("/")[4:6] | join("/") }}'
|
||||
|
||||
- name: Look up details for this deployment
|
||||
k8s_info:
|
||||
api_version: "{{ api_version }}"
|
||||
kind: "AWX" # Find a way to dynamically get this
|
||||
kind: "AWX"
|
||||
name: "{{ deployment_name }}"
|
||||
namespace: "{{ meta.namespace }}"
|
||||
register: this_awx
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
---
|
||||
|
||||
- name: Set apiVersion and kind variables
|
||||
set_fact:
|
||||
api_version: '{{ hostvars["localhost"]["inventory_file"].split("/")[4:6] | join("/") }}'
|
||||
kind: '{{ hostvars["localhost"]["inventory_file"].split("/")[6] }}'
|
||||
|
||||
- name: Look up details for this backup object
|
||||
k8s_info:
|
||||
api_version: "{{ api_version }}"
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
---
|
||||
- name: Set apiVersion and kind variables
|
||||
set_fact:
|
||||
api_version: '{{ hostvars["localhost"]["inventory_file"].split("/")[4:6] | join("/") }}'
|
||||
kind: '{{ hostvars["localhost"]["inventory_file"].split("/")[6] }}'
|
||||
|
||||
# The backup directory in this status can be referenced when restoring
|
||||
- name: Update Tower Backup status
|
||||
|
||||
@@ -113,12 +113,6 @@
|
||||
awx_postgres_host: "{{ pg_config['resources'][0]['data']['host'] | b64decode }}"
|
||||
awx_postgres_sslmode: "{{ pg_config['resources'][0]['data']['sslmode'] | default('prefer'|b64encode) | b64decode }}"
|
||||
|
||||
|
||||
- name: Set apiVersion and kind variables
|
||||
set_fact:
|
||||
api_version: '{{ hostvars["localhost"]["inventory_file"].split("/")[4:6] | join("/") }}'
|
||||
kind: '{{ hostvars["localhost"]["inventory_file"].split("/")[6] }}'
|
||||
|
||||
- name: Look up details for this deployment
|
||||
k8s_info:
|
||||
api_version: "{{ api_version }}"
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
---
|
||||
# Required: specify name of tower deployment to restore to
|
||||
deployment_name: ''
|
||||
kind: 'AWXRestore'
|
||||
api_version: '{{ deployment_type }}.ansible.com/v1beta1'
|
||||
|
||||
# Required: specify a pre-created PVC (name) to restore from
|
||||
backup_pvc: ''
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
---
|
||||
|
||||
- name: Set apiVersion and kind variables
|
||||
set_fact:
|
||||
api_version: '{{ hostvars["localhost"]["inventory_file"].split("/")[4:6] | join("/") }}'
|
||||
kind: '{{ hostvars["localhost"]["inventory_file"].split("/")[6] }}'
|
||||
|
||||
- name: Determine the timestamp
|
||||
set_fact:
|
||||
now: '{{ lookup("pipe", "date +%FT%TZ") }}'
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
---
|
||||
|
||||
- name: Set apiVersion and kind variables
|
||||
set_fact:
|
||||
api_version: '{{ hostvars["localhost"]["inventory_file"].split("/")[4:6] | join("/") }}'
|
||||
kind: '{{ hostvars["localhost"]["inventory_file"].split("/")[6] }}'
|
||||
|
||||
- name: Look up details for this restore object
|
||||
k8s_info:
|
||||
api_version: "{{ api_version }}"
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
---
|
||||
- name: Set apiVersion and kind variables
|
||||
set_fact:
|
||||
api_version: '{{ hostvars["localhost"]["inventory_file"].split("/")[4:6] | join("/") }}'
|
||||
kind: '{{ hostvars["localhost"]["inventory_file"].split("/")[6] }}'
|
||||
|
||||
- name: Update Tower Restore status
|
||||
operator_sdk.util.k8s_status:
|
||||
|
||||
Reference in New Issue
Block a user