43 lines
1.2 KiB
YAML
43 lines
1.2 KiB
YAML
---
|
|
- name: "Création BDD"
|
|
community.postgresql.postgresql_db:
|
|
name: "{{ zabbix_postgresql_database }}"
|
|
|
|
- name: "Création utilisateur DB"
|
|
community.postgresql.postgresql_user:
|
|
db: "{{ zabbix_postgresql_database }}"
|
|
name: "{{ zabbix_postgresql_username }}"
|
|
password: "{{ zabbix_postgresql_password }}"
|
|
|
|
- name: "Autorisations sur schema public"
|
|
community.postgresql.postgresql_privs:
|
|
database: "{{ zabbix_postgresql_database }}"
|
|
state: present
|
|
privs: SELECT,INSERT,UPDATE,DELETE
|
|
objs: ALL_IN_SCHEMA
|
|
role: "{{ zabbix_postgresql_username }}"
|
|
schema: public
|
|
|
|
- name: "Autorisations sur schema public"
|
|
community.postgresql.postgresql_privs:
|
|
db: "{{ zabbix_postgresql_database }}"
|
|
state: present
|
|
privs: ALL
|
|
role: "{{ zabbix_postgresql_username }}"
|
|
type: schema
|
|
objs: public
|
|
|
|
- name: "Autorisations sur BDD"
|
|
community.postgresql.postgresql_privs:
|
|
db: "{{ zabbix_postgresql_database }}"
|
|
privs: ALL
|
|
objs: "{{ zabbix_postgresql_database }}"
|
|
role: "{{ zabbix_postgresql_username }}"
|
|
type: database
|
|
|
|
- name: "Changement owner"
|
|
community.postgresql.postgresql_owner:
|
|
obj_type: "database"
|
|
new_owner: "{{ zabbix_postgresql_username }}"
|
|
db: "{{ zabbix_postgresql_database }}"
|