infrastructure/k8s/roles/postgres-config/tasks/main.yaml

29 lines
No EOL
812 B
YAML

---
- name: Create users
community.postgresql.postgresql_user:
name: "{{ item.name }}"
password: "{{ item.password }}"
login_host: "127.0.0.1"
login_password: "{{ PostgresPassword }}"
loop:
- name: gitea
password: "{{ gitea.dbPassword }}"
- name: "{{ grafana.db.user }}"
password: "{{ grafana.db.password }}"
- name: "{{ concourse.db.user }}"
password: "{{ concourse.db.password }}"
- name: Create databases
community.postgresql.postgresql_db:
name: "{{ item.name }}"
owner: "{{ item.owner }}"
encoding: UTF-8
login_host: "127.0.0.1"
login_password: "{{ PostgresPassword }}"
loop:
- name: gitea
owner: gitea
- name: concourse
owner: "{{ concourse.db.user }}"
- name: grafana
owner: "{{ grafana.db.user }}"