infrastructure/k8s/roles/postgres/tasks/main.yml

33 lines
828 B
YAML
Raw Normal View History

2022-09-11 16:49:31 +00:00
---
- name: Create postgres namespace
kubernetes.core.k8s:
name: postgres
api_version: v1
kind: Namespace
state: present
- name: Create Postgres secret
kubernetes.core.k8s:
state: present
definition:
apiVersion: v1
kind: Secret
metadata:
name: postgres-credentials
namespace: postgres
data:
postgres-password: "{{ PostgresPassword | b64encode }}"
- name: Add Bitnami chart repo
kubernetes.core.helm_repository:
name: bitnami
repo_url: https://charts.bitnami.com/bitnami
- name: Deploy Postgres chart
kubernetes.core.helm:
name: default-postgres
chart_ref: bitnami/postgresql
release_namespace: postgres
2022-11-15 19:38:29 +00:00
chart_version: 11.9.13
2022-09-11 16:49:31 +00:00
release_values: "{{ lookup('ansible.builtin.file', 'values.postgres.yaml') | from_yaml }}"