35 lines
720 B
YAML
35 lines
720 B
YAML
---
|
|
- name: Converge
|
|
hosts: all
|
|
roles:
|
|
- postgresql
|
|
vars:
|
|
postgresql_use_official_repository: true
|
|
postgresql_primary: true
|
|
postgresql_config:
|
|
listen_addresses: '*'
|
|
postgresql_hba:
|
|
- type: hostssl
|
|
databases:
|
|
- myappli
|
|
- myappli2
|
|
users: all
|
|
subnet: samenet
|
|
method: md5
|
|
postgresql_databases:
|
|
- name: myappli
|
|
- name: myappli2
|
|
postgresql_users:
|
|
- name: myuser
|
|
database: myappli
|
|
password: secret
|
|
privileges:
|
|
- ALL
|
|
attributes:
|
|
- REPLICATION
|
|
- INHERIT
|
|
|
|
pre_tasks:
|
|
- name: update apt cache
|
|
ansible.builtin.apt:
|
|
update_cache: true
|