From 6a03b230572bfb5ac7d758a3557703d6e98f9225 Mon Sep 17 00:00:00 2001 From: Ton Smeele Date: Mon, 20 Jan 2025 14:51:50 +0100 Subject: [PATCH] replace handler by immediate postgresql restart --- playbooks/roles/irods_server/handlers/main.yml | 5 ----- playbooks/roles/irods_server/tasks/icat.yml | 7 +++++-- 2 files changed, 5 insertions(+), 7 deletions(-) delete mode 100644 playbooks/roles/irods_server/handlers/main.yml diff --git a/playbooks/roles/irods_server/handlers/main.yml b/playbooks/roles/irods_server/handlers/main.yml deleted file mode 100644 index 078b4fd0..00000000 --- a/playbooks/roles/irods_server/handlers/main.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- name: Restart PostgreSQL - ansible.builtin.service: - name: "postgresql" - state: restarted diff --git a/playbooks/roles/irods_server/tasks/icat.yml b/playbooks/roles/irods_server/tasks/icat.yml index de331e62..6a0ce866 100644 --- a/playbooks/roles/irods_server/tasks/icat.yml +++ b/playbooks/roles/irods_server/tasks/icat.yml @@ -20,7 +20,6 @@ dest: "/var/lib/pgsql/data/pg_hba.conf" regexp: 'host\s+all\s+all\s+127.0.0.1/32' line: 'host all all 127.0.0.1/32 md5' - notify: Restart PostgreSQL when: ansible_pkg_mgr == 'dnf' @@ -29,5 +28,9 @@ dest: "/var/lib/pgsql/data/pg_hba.conf" regexp: 'host\s+all\s+all\s+::1/128' line: 'host all all ::1/128 md5' - notify: Restart PostgreSQL when: ansible_pkg_mgr == 'dnf' + +- name: Restart PostgreSQL to implement changed access methods + ansible.builtin.service: + name: postgresql + state: restarted