From 076008c0b876de1476c013042949144d9b90814c Mon Sep 17 00:00:00 2001 From: Teodoro Cook Date: Tue, 2 Apr 2024 14:58:03 -0600 Subject: [PATCH] Refactor database role semantics (#27) --- molecule/databases/molecule.yml | 4 ---- tasks/databases.yml | 5 ++--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/molecule/databases/molecule.yml b/molecule/databases/molecule.yml index 476e0da..010caa6 100644 --- a/molecule/databases/molecule.yml +++ b/molecule/databases/molecule.yml @@ -52,12 +52,8 @@ provisioner: roles: - name: admins privs: ALL - type: database - objs: database - name: read_only privs: ALL - type: database - objs: database verifier: name: ansible scenario: diff --git a/tasks/databases.yml b/tasks/databases.yml index f478b86..41ab48a 100644 --- a/tasks/databases.yml +++ b/tasks/databases.yml @@ -23,12 +23,11 @@ db: "{{ _database.db_connect | default(postgresql_default_database) }}" role: "{{ _role.name }}" privs: "{{ _role.privs | default(omit) }}" - objs: "{{ _role.objs | default(omit) }}" + objs: "{{ _database.name }}" schema: "{{ _role.schema | default(omit) }}" - type: "{{ _role.type | default(omit) }}" + type: database grant_option: "{{ _role.grant_option | default(omit) }}" session_role: "{{ _database.session_role | default(omit) }}" - ssl_mode: "{{ _database.ssl_mode | default(omit) }}" state: "{{ _role.state | default('present') }}" vars: ansible_ssh_pipelining: true