-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move to default distro data directory paths (#12)
* Move to default distro data directory schema * Secure hba configuration * Add socket directory configuration * Add unix socket directory configuration * Enable checksums on Debian based distributions
- Loading branch information
1 parent
f69fd14
commit c0d207c
Showing
14 changed files
with
155 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,32 @@ | ||
--- | ||
- name: Set global facts | ||
ansible.builtin.set_fact: | ||
_postgresql_package_name: "{{ postgresql_package_name | default(_default_package) }}" | ||
_postgresql_package_name: "{{ postgresql_package_name | default(_default_package_name) }}" | ||
_postgresql_service_name: "{{ postgresql_service_name | default(_default_service) }}" | ||
_postgresql_bindir: "{{ __postgresql_bindir | nephelaiio.plugins.sorted_get(_conf_search) }}" | ||
_postgresql_datadir: "{{ postgresql_datadir }}" | ||
_postgresql_waldir: "{{ postgresql_waldir }}" | ||
_postgresql_datadir: "{{ _conf_datadir }}" | ||
_postgresql_socketdir: "{{ _conf_socketdir }}" | ||
_postgresql_initdb: "{{ postgresql_initdb }}" | ||
_postgresql_auth_method: "{{ _auth_method }}" | ||
_postgresql_pgoptions: "{{ (_auth_method == _auth_scram_sha256) | ternary(_auth_scram_option, '') }}" | ||
_postgresql_conf_include: "{{ _conf_include }}" | ||
_postgresql_conf_main: "{{ _conf_main }}" | ||
_postgresql_conf_hba: "{{ postgresql_datadir }}/pg_hba.conf" | ||
_postgresql_conf_ident: "{{ postgresql_datadir }}/pg_ident.conf" | ||
_postgresql_conf_hba: "{{ _conf_datadir }}/pg_hba.conf" | ||
_postgresql_conf_ident: "{{ _conf_datadir }}/pg_ident.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 }}" | ||
_postgresql_conf_pgstat_statements: "{{ _conf_include }}/{{ __postgresql_conf_pgstat_statements }}" | ||
_postgresql_conf_standby: "{{ _conf_include }}/{{ __postgresql_conf_standby }}" | ||
_postgresql_conf_local: "{{ _conf_include }}/{{ __postgresql_conf_local }}" | ||
_postgresql_conf_exclude: "{{ __postgresql_conf_exclude }}" | ||
vars: | ||
_default_package: "{{ __postgresql_package_name | nephelaiio.plugins.sorted_get(_conf_search) }}" | ||
_default_package_name: "{{ __postgresql_package_name | nephelaiio.plugins.sorted_get(_conf_search) }}" | ||
_default_service: "{{ __postgresql_service_name | nephelaiio.plugins.sorted_get(_conf_search) }}" | ||
_conf_datadir: "{{ __postgresql_datadir | nephelaiio.plugins.sorted_get(_conf_search) }}" | ||
_conf_socketdir: "{{ __postgresql_socketdir | nephelaiio.plugins.sorted_get(_conf_search) }}" | ||
_conf_search: "{{ __postgresql_os_search }}" | ||
_conf_include: "{{ postgresql_datadir }}/conf.d" | ||
_conf_main: "{{ __postgresql_conf_main | nephelaiio.plugins.sorted_get(_conf_search) }}" | ||
_conf_include: "{{ _conf_main | dirname }}/conf.d" | ||
_auth_scram_sha256: "scram-sha-256" | ||
_auth_scram_option: '-c password_encryption={{ _auth_scram_sha256 }}' | ||
_auth_method: "{{ postgresql_auth_method }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{{ ansible_managed | comment }} | ||
|
||
local all all peer | ||
{% for e in _entries -%} | ||
{{ '%-20s %-20s %-20s %-20s %s %s' | format(e.type, e.database, e.user, e.address | default(''), e.auth_method, e.auth_options|default("")) }} | ||
{% endfor -%} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
{{ ansible_managed | comment }} | ||
|
||
include_dir = '{{ _postgresql_conf_include | basename }}' | ||
|
||
listen_addresses = '*' | ||
|
||
data_directory = '{{ _postgresql_datadir }}' | ||
unix_socket_directories = '{{ _postgresql_socketdir }}, /tmp' | ||
hba_file = '{{ _postgresql_conf_hba }}' | ||
ident_file = '{{ _postgresql_conf_ident }}' | ||
|
||
shared_preload_libraries = 'pgaudit,pg_cron,pg_stat_statements' |