Skip to content

Commit

Permalink
Add socket directory configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
teddyphreak committed Mar 18, 2024
1 parent 418d1df commit beadce2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions defaults/main/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ __postgresql_bindir:
__postgresql_datadir:
redhat: "/var/lib/pgsql/{{ postgresql_release }}/main/data"
debian: "/var/lib/postgresql/{{ postgresql_release }}/main"
__postgresql_socketdir:
redhat: "/run/postgresql"
debian: "/var/run/postgresql"
2 changes: 2 additions & 0 deletions tasks/vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
_postgresql_service_name: "{{ postgresql_service_name | default(_default_service) }}"
_postgresql_bindir: "{{ __postgresql_bindir | nephelaiio.plugins.sorted_get(_conf_search) }}"
_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, '') }}"
Expand All @@ -22,6 +23,7 @@
_default_package: "{{ __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_main: "{{ __postgresql_conf_main | nephelaiio.plugins.sorted_get(_conf_search) }}"
_conf_include: "{{ _conf_main | dirname }}/conf.d"
Expand Down
1 change: 1 addition & 0 deletions templates/postgresql.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ include_dir = '{{ _postgresql_conf_include | basename }}'
listen_addresses = '*'

data_directory = '{{ _postgresql_datadir }}'
unix_socket_directory = '{{ _postgresql_socketdir }}'
hba_file = '{{ _postgresql_conf_hba }}'
ident_file = '{{ _postgresql_conf_ident }}'

0 comments on commit beadce2

Please sign in to comment.