mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 11:00:03 -03:30
Put postgresql values in a tempfile, to be loaded by helm cli
Helm 3.x does not support passing values via stdin: https://github.com/helm/helm/issues/7002 So setup a tempfile and write the template to the tempfile to be loaded by helm ... --values <tempfile> Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
This commit is contained in:
parent
34d01f02cc
commit
1c50b8427a
@ -79,19 +79,26 @@
|
||||
|
||||
- name: Deploy PostgreSQL (Kubernetes)
|
||||
block:
|
||||
- name: Template PostgreSQL Deployment (Kubernetes)
|
||||
set_fact:
|
||||
pg_values: "{{ lookup('template', 'postgresql-values.yml.j2') }}"
|
||||
- name: Create Temporary Values File (Kubernetes)
|
||||
tempfile:
|
||||
state: file
|
||||
suffix: .yml
|
||||
register: values_file
|
||||
|
||||
- name: Populate Temporary Values File (Kubernetes)
|
||||
template:
|
||||
src: postgresql-values.yml.j2
|
||||
dest: "{{ values_file.path }}"
|
||||
no_log: true
|
||||
|
||||
- name: Deploy and Activate Postgres (Kubernetes)
|
||||
shell: |
|
||||
helm repo update
|
||||
echo {{ pg_values | quote }} | helm upgrade {{ postgresql_service_name }} \
|
||||
helm upgrade {{ postgresql_service_name }} \
|
||||
--install \
|
||||
--namespace {{ kubernetes_namespace }} \
|
||||
--version="8.1.5" \
|
||||
--values - \
|
||||
--values {{ values_file.path }} \
|
||||
stable/postgresql
|
||||
register: kubernetes_pg_activate
|
||||
no_log: true
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user