Ajout fichiers

This commit is contained in:
Nicolas Lang
2025-04-07 08:26:32 +00:00
parent 3468f899bd
commit 8cf9fbec36
10 changed files with 1378 additions and 0 deletions
+42
View File
@@ -0,0 +1,42 @@
---
- 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 }}"