2021-09-10 12:09:38 +00:00
|
|
|
---
|
|
|
|
- name: Converge
|
|
|
|
hosts: all
|
|
|
|
roles:
|
2022-02-18 08:21:18 +00:00
|
|
|
- ansible-role-postgresql
|
2021-09-10 12:09:38 +00:00
|
|
|
vars:
|
|
|
|
postgresql_use_official_repository: true
|
2021-09-11 12:38:26 +00:00
|
|
|
postgresql_primary: true
|
2021-09-10 12:09:38 +00:00
|
|
|
postgresql_config:
|
2023-08-28 12:55:55 +00:00
|
|
|
listen_addresses: "*"
|
2021-09-10 12:09:38 +00:00
|
|
|
postgresql_hba:
|
2022-02-21 09:13:57 +00:00
|
|
|
- type: local
|
2021-09-10 12:09:38 +00:00
|
|
|
databases:
|
|
|
|
- myappli
|
2021-10-22 08:26:56 +00:00
|
|
|
- myappli2
|
2021-09-10 12:09:38 +00:00
|
|
|
users: all
|
|
|
|
method: md5
|
|
|
|
postgresql_databases:
|
|
|
|
- name: myappli
|
2022-07-20 08:35:39 +00:00
|
|
|
owner: test
|
2021-10-22 08:26:56 +00:00
|
|
|
- name: myappli2
|
2022-07-20 08:35:39 +00:00
|
|
|
owner: test
|
2021-09-10 12:09:38 +00:00
|
|
|
postgresql_users:
|
2022-02-21 09:13:57 +00:00
|
|
|
test:
|
|
|
|
password: secret
|
|
|
|
myuser:
|
2021-09-10 12:09:38 +00:00
|
|
|
password: secret
|
2021-11-09 10:40:21 +00:00
|
|
|
attributes:
|
|
|
|
- REPLICATION
|
|
|
|
- INHERIT
|
2022-02-21 09:13:57 +00:00
|
|
|
postgresql_privileges:
|
|
|
|
- role: myuser
|
2023-08-28 12:55:55 +00:00
|
|
|
type: schema
|
2022-02-21 09:13:57 +00:00
|
|
|
database: myappli
|
|
|
|
objets:
|
2023-08-28 12:55:55 +00:00
|
|
|
- public
|
2022-02-21 09:13:57 +00:00
|
|
|
privileges:
|
|
|
|
- ALL
|
2021-09-10 12:09:38 +00:00
|
|
|
|
|
|
|
pre_tasks:
|
2023-08-28 12:55:55 +00:00
|
|
|
- name: Update apt cache
|
2021-09-10 12:09:38 +00:00
|
|
|
ansible.builtin.apt:
|
|
|
|
update_cache: true
|