Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

Method of extending PostgreSQL service unit configuration is deprecated #10

Closed
p-j-smith opened this issue Jul 3, 2023 · 0 comments · Fixed by #13
Closed

Method of extending PostgreSQL service unit configuration is deprecated #10

p-j-smith opened this issue Jul 3, 2023 · 0 comments · Fixed by #13

Comments

@p-j-smith
Copy link
Contributor

Currently, the service configuration is done by writing the values to override to the file "/etc/systemd/system/{{ postgresql_service_name }}.service":

- name: Set custom postgresql service configuration
ansible.builtin.template:
src: postgresql.service.j2
dest: "{{ postgresql_service.filename }}"
owner: "root"
group: "root"
mode: 0644
register: postgresql_custom_service_config

However, the template file uses the deprecated keyword include to include the default configuration:

.include /lib/systemd/system/{{ postgresql_service_name }}.service

Either:

  • the entire configuration should be added to "/etc/systemd/system/{{ postgresql_service_name }}.service", as described here
  • or, the default configuration can be extended as described here

Note, this causes an error on Red Hat 9 as support for the include keyword has been removed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant