mirror of
https://gitea.0xace.cc/ansible-galaxy/postgresql.git
synced 2024-11-25 00:06:42 +00:00
reload before restart
This commit is contained in:
parent
5180e29e2f
commit
d6055efe29
@ -1,10 +1,19 @@
|
|||||||
- block:
|
- name: Reload PostgreSQL
|
||||||
- name: Restart PostgreSQL
|
throttle: 1
|
||||||
throttle: 1
|
ansible.builtin.systemd:
|
||||||
ansible.builtin.systemd:
|
name: "{{ postgresql_unit_name }}"
|
||||||
name: "{{ postgresql_unit_name }}"
|
state: reloaded
|
||||||
state: restarted
|
daemon_reload: yes
|
||||||
daemon_reload: yes
|
when:
|
||||||
when:
|
- not postgresql_setup.changed
|
||||||
- not postgresql_setup.changed
|
- not postgresql_enable_and_start.changed
|
||||||
- not postgresql_enable_and_start.changed
|
|
||||||
|
- name: Restart PostgreSQL
|
||||||
|
throttle: 1
|
||||||
|
ansible.builtin.systemd:
|
||||||
|
name: "{{ postgresql_unit_name }}"
|
||||||
|
state: restarted
|
||||||
|
daemon_reload: yes
|
||||||
|
when:
|
||||||
|
- not postgresql_setup.changed
|
||||||
|
- not postgresql_enable_and_start.changed
|
||||||
|
@ -35,7 +35,9 @@
|
|||||||
owner: postgres
|
owner: postgres
|
||||||
group: postgres
|
group: postgres
|
||||||
register: pg_hba_config_file
|
register: pg_hba_config_file
|
||||||
notify: Restart PostgreSQL
|
notify:
|
||||||
|
- Reload PostgreSQL
|
||||||
|
- Restart PostgreSQL
|
||||||
- name: Template PostgreSQL configuration
|
- name: Template PostgreSQL configuration
|
||||||
template:
|
template:
|
||||||
src: "{{ postgresql_major_version }}-postgresql.conf.j2"
|
src: "{{ postgresql_major_version }}-postgresql.conf.j2"
|
||||||
@ -44,7 +46,9 @@
|
|||||||
owner: postgres
|
owner: postgres
|
||||||
group: postgres
|
group: postgres
|
||||||
register: postgresql_config_file
|
register: postgresql_config_file
|
||||||
notify: Restart PostgreSQL
|
notify:
|
||||||
|
- Reload PostgreSQL
|
||||||
|
- Restart PostgreSQL
|
||||||
- name: Template PostgreSQL SSL configuration
|
- name: Template PostgreSQL SSL configuration
|
||||||
template:
|
template:
|
||||||
src: "{{ postgresql_major_version }}-postgresql.ssl.conf.j2"
|
src: "{{ postgresql_major_version }}-postgresql.ssl.conf.j2"
|
||||||
@ -53,5 +57,7 @@
|
|||||||
owner: postgres
|
owner: postgres
|
||||||
group: postgres
|
group: postgres
|
||||||
register: postgresql_ssl_config_file
|
register: postgresql_ssl_config_file
|
||||||
notify: Restart PostgreSQL
|
notify:
|
||||||
|
- Reload PostgreSQL
|
||||||
|
- Restart PostgreSQL
|
||||||
when: postgresql_ssl
|
when: postgresql_ssl
|
||||||
|
@ -21,7 +21,9 @@
|
|||||||
owner: postgres
|
owner: postgres
|
||||||
group: postgres
|
group: postgres
|
||||||
register: pg_hba_config_file
|
register: pg_hba_config_file
|
||||||
notify: Restart PostgreSQL
|
notify:
|
||||||
|
- Reload PostgreSQL
|
||||||
|
- Restart PostgreSQL
|
||||||
- name: Template PostgreSQL configuration
|
- name: Template PostgreSQL configuration
|
||||||
template:
|
template:
|
||||||
src: "{{ postgresql_major_version }}-postgresql.conf.j2"
|
src: "{{ postgresql_major_version }}-postgresql.conf.j2"
|
||||||
@ -30,7 +32,9 @@
|
|||||||
owner: postgres
|
owner: postgres
|
||||||
group: postgres
|
group: postgres
|
||||||
register: postgresql_config_file
|
register: postgresql_config_file
|
||||||
notify: Restart PostgreSQL
|
notify:
|
||||||
|
- Reload PostgreSQL
|
||||||
|
- Restart PostgreSQL
|
||||||
- name: Template PostgreSQL SSL configuration
|
- name: Template PostgreSQL SSL configuration
|
||||||
template:
|
template:
|
||||||
src: "{{ postgresql_major_version }}-postgresql.ssl.conf.j2"
|
src: "{{ postgresql_major_version }}-postgresql.ssl.conf.j2"
|
||||||
@ -39,5 +43,7 @@
|
|||||||
owner: postgres
|
owner: postgres
|
||||||
group: postgres
|
group: postgres
|
||||||
register: postgresql_ssl_config_file
|
register: postgresql_ssl_config_file
|
||||||
notify: Restart PostgreSQL
|
notify:
|
||||||
|
- Reload PostgreSQL
|
||||||
|
- Restart PostgreSQL
|
||||||
when: postgresql_ssl
|
when: postgresql_ssl
|
||||||
|
@ -16,7 +16,9 @@
|
|||||||
content: |
|
content: |
|
||||||
[Service]
|
[Service]
|
||||||
Environment=PGDATA={{ postgresql_data_dir }}
|
Environment=PGDATA={{ postgresql_data_dir }}
|
||||||
notify: Restart PostgreSQL
|
notify:
|
||||||
|
- Reload PostgreSQL
|
||||||
|
- Restart PostgreSQL
|
||||||
|
|
||||||
- name: Systemd daemon-reload
|
- name: Systemd daemon-reload
|
||||||
systemd:
|
systemd:
|
||||||
|
Loading…
Reference in New Issue
Block a user