mirror of
https://github.com/ansible/awx-operator.git
synced 2026-03-26 21:33:14 +00:00
add default cluster name (#1129)
* add default cluster name * Update awx.ansible.com_awxrestores.yaml Co-authored-by: Kirill Smirnov <kirilsmirnov@x5.ru>
This commit is contained in:
@@ -50,6 +50,9 @@ spec:
|
||||
description: Name of the restored deployment. This should be different from the original deployment name
|
||||
if the original deployment still exists.
|
||||
type: string
|
||||
cluster_name:
|
||||
description: Cluster name
|
||||
type: string
|
||||
backup_name:
|
||||
description: AWXBackup object name
|
||||
type: string
|
||||
|
||||
@@ -11,6 +11,9 @@ backup_pvc_namespace: '{{ ansible_operator_meta.namespace }}'
|
||||
# Required: backup name, found on the awxbackup object
|
||||
backup_dir: ''
|
||||
|
||||
# Default cluster name
|
||||
cluster_name: 'cluster.local'
|
||||
|
||||
# Set no_log settings on certain tasks
|
||||
no_log: true
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
|
||||
- name: Set full resolvable host name for postgres pod
|
||||
set_fact:
|
||||
resolvable_db_host: "{{ awx_postgres_host }}.{{ ansible_operator_meta.namespace }}.svc.cluster.local"
|
||||
resolvable_db_host: "{{ awx_postgres_host }}.{{ ansible_operator_meta.namespace }}.svc.{{ cluster_name }}"
|
||||
no_log: "{{ no_log }}"
|
||||
when: awx_postgres_type == 'managed'
|
||||
|
||||
@@ -76,7 +76,6 @@
|
||||
pg_restore --clean --if-exists
|
||||
-U {{ awx_postgres_user }}
|
||||
-h {{ resolvable_db_host }}
|
||||
-U {{ awx_postgres_user }}
|
||||
-d {{ awx_postgres_database }}
|
||||
-p {{ awx_postgres_port }}
|
||||
no_log: "{{ no_log }}"
|
||||
|
||||
Reference in New Issue
Block a user