From e4b7f3722786012d6f3785158dae6ae536e5667f Mon Sep 17 00:00:00 2001 From: Ted Cook Date: Tue, 26 Mar 2024 09:25:23 -0600 Subject: [PATCH] Add basename parameters for configuration files --- README.md | 39 +++++++++++++++++++++------------------ tasks/vars.yml | 6 +++--- 2 files changed, 24 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 4ae04fb..4a3ec2f 100644 --- a/README.md +++ b/README.md @@ -11,24 +11,27 @@ The following is the list of end-user serviceable parameters: Global PostgreSQL configuration -| Parameter | Default | Type | Description | Required | -|:-----------------------------|---------:|:-------|:-------------------------------------------|:---------| -| postgresql_release | 16 | string | Target PostgreSQL major release | false | -| postgresql_user | postgres | string | OS user for postgres daemon | false | -| postgresql_group | postgres | string | OS group for postgres daemon | false | -| postgresql_package_state | present | string | PostgreSQL package state | false | -| postgresql_service_state | started | string | PostgreSQL service state | false | -| postgresql_service_enabled | true | bool | Start PostgreSQL on boot | false | -| postgresql_roles | [] | list | List of PostgreSQL roles | false | -| postgresql_databases | [] | list | List of PostgreSQL databases | false | -| postgresql_hba_entries | [] | list | List of HBA entries | false | -| postgresql_ident_entries | [] | list | List of ident entries | false | -| postgresql_initdb | true | list | Toggle flag for database initialization | false | -| postgresql_conf_main_manage | true | list | Toggle flag for postgresql.conf management | false | -| postgresql_conf_hba_manage | true | list | Toggle flag for pg_hba.conf management | false | -| postgresql_conf_ident_manage | true | list | Toggle flag for pg_ident.conf management | false | -| postgresql_role_manage | true | list | Toggle flag for role management | false | -| postgresql_datrabase_manage | true | list | Toggle flag for database management | false | +| Parameter | Default | Type | Description | Required | +|:-----------------------------|----------------:|:-------|:-------------------------------------------|:---------| +| postgresql_release | 16 | string | Target PostgreSQL major release | false | +| postgresql_user | postgres | string | OS user for postgres daemon | false | +| postgresql_group | postgres | string | OS group for postgres daemon | false | +| postgresql_package_state | present | string | PostgreSQL package state | false | +| postgresql_service_state | started | string | PostgreSQL service state | false | +| postgresql_service_enabled | true | bool | Start PostgreSQL on boot | false | +| postgresql_roles | [] | list | List of PostgreSQL roles | false | +| postgresql_databases | [] | list | List of PostgreSQL databases | false | +| postgresql_hba_entries | [] | list | List of HBA entries | false | +| postgresql_ident_entries | [] | list | List of ident entries | false | +| postgresql_initdb | true | list | Toggle flag for database initialization | false | +| postgresql_conf_main_file | postgresql.conf | string | Main config file basename | false | +| postgresql_conf_ident_file | pg_ident.conf | string | Ident config file basename | false | +| postgresql_conf_hba_file | pg_hba.conf | string | HBA config file basename | false | +| postgresql_conf_main_manage | true | list | Toggle flag for postgresql.conf management | false | +| postgresql_conf_hba_manage | true | list | Toggle flag for pg_hba.conf management | false | +| postgresql_conf_ident_manage | true | list | Toggle flag for pg_ident.conf management | false | +| postgresql_role_manage | true | list | Toggle flag for role management | false | +| postgresql_datrabase_manage | true | list | Toggle flag for database management | false | Please refer to the [defaults directory](/defaults/main/) for an up to date list of input parameters. diff --git a/tasks/vars.yml b/tasks/vars.yml index 1978712..a39c9e2 100644 --- a/tasks/vars.yml +++ b/tasks/vars.yml @@ -19,9 +19,9 @@ _postgresql_conf_main_manage: "{{ postgresql_conf_main_manage | default(True) }}" _postgresql_conf_hba_manage: "{{ postgresql_conf_hba_manage | default(True) }}" _postgresql_conf_ident_manage: "{{ postgresql_conf_ident_manage | default(True) }}" - _postgresql_conf_main: "{{ _conf_confdir }}/postgresql.conf" - _postgresql_conf_ident: "{{ _conf_confdir }}/pg_ident.conf" - _postgresql_conf_hba: "{{ _conf_confdir }}/pg_hba.conf" + _postgresql_conf_main: "{{ _conf_confdir }}/{{ postgresql_conf_main_file | default('postgresql.conf') }}" + _postgresql_conf_ident: "{{ _conf_confdir }}/{{ postgresql_conf_ident_file | default('pg_ident.conf') }}" + _postgresql_conf_hba: "{{ _conf_confdir }}/{{ postgresql_conf_hba_file | default('pg_hba.conf') }}" _postgresql_conf_ansible: "{{ _conf_include }}/{{ __postgresql_conf_ansible }}" _postgresql_conf_pgaudit: "{{ _conf_include }}/{{ __postgresql_conf_pgaudit }}" _postgresql_conf_pgcron: "{{ _conf_include }}/{{ __postgresql_conf_pgcron }}"