Skip to content

Commit

Permalink
Allow to prevent postgresql restart
Browse files Browse the repository at this point in the history
Allow to prevent postgresql restart after configuration changes
on some environments such as production.
  • Loading branch information
Jamal-B committed Feb 15, 2024
1 parent 447b91c commit 68931b3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ postgresql_ctype: "en_US.UTF-8"
postgresql_admin_user: "postgres"
postgresql_default_auth_method: "peer"
postgresql_service_restarted_state: "reloaded" # state of the service after configuration changes (e.g. restarted, reloaded).
postgresql_cluster_name: main
postgresql_cluster_reset: false
Expand Down
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ postgresql_default_auth_method_hosts: "{{ 'scram-sha-256' if postgresql_version
postgresql_service_user: "{{ postgresql_admin_user }}"
postgresql_service_user_pgsql_profile: false
postgresql_service_group: "{{ postgresql_admin_user }}"
postgresql_service_restarted_state: "reloaded"

postgresql_cluster_name: "main" # postgres default is ''
postgresql_cluster_reset: false
Expand Down
2 changes: 1 addition & 1 deletion handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
- name: restart postgresql
service:
name: "{{ postgresql_service_name }}"
state: restarted
state: "{{ postgresql_service_restarted_state }}"
enabled: yes

0 comments on commit 68931b3

Please sign in to comment.