diff --git a/tasks/main.yaml b/tasks/main.yaml index 92499e7..de06031 100644 --- a/tasks/main.yaml +++ b/tasks/main.yaml @@ -96,6 +96,7 @@ owner: "{{ pgbouncer_systemd_user }}" group: "{{ pgbouncer_systemd_group }}" mode: 0640 + backup: yes notify: "restart pgbouncer" when: existing_pgcluster is not defined or not existing_pgcluster|bool tags: pgbouncer_conf, pgbouncer @@ -136,9 +137,10 @@ template: src: templates/userlist.txt.j2 dest: "{{ pgbouncer_auth_file }}" - owner: postgres - group: postgres + owner: "{{ pgbouncer_systemd_user }}" + group: "{{ pgbouncer_systemd_group }}" mode: 0640 + backup: yes when: existing_pgcluster is not defined or not existing_pgcluster|bool tags: pgbouncer diff --git a/vars/Debian.yaml b/vars/Debian.yaml index a73cf0c..12ab3b2 100644 --- a/vars/Debian.yaml +++ b/vars/Debian.yaml @@ -5,4 +5,4 @@ pgbouncer_postgresql_data_dir: "{{ pgbouncer_postgresql_home_dir }}/{{ pgbouncer pgbouncer_postgresql_ssl_path: "{{ pgbouncer_postgresql_config_dir }}/{{ pgbouncer_postgresql_major_version }}/{{ pgbouncer_postgresql_cluster_name }}" pgbouncer_postgresql_cluster_name: "main" -pgbouncer_postgresql_package_name_regex: 'postgresql-.[{{ pgbouncer_postgresql_supported_versions | join(",") }}]' +pgbouncer_postgresql_package_name_regex: 'postgres.*[{{ pgbouncer_postgresql_supported_versions | join(",") }}]' diff --git a/vars/RedHat.yaml b/vars/RedHat.yaml index 01521b9..2b69629 100644 --- a/vars/RedHat.yaml +++ b/vars/RedHat.yaml @@ -5,4 +5,4 @@ pgbouncer_postgresql_config_dir: "{{ pgbouncer_postgresql_data_dir }}" pgbouncer_postgresql_config_cluster_dir: "{{ pgbouncer_postgresql_data_dir }}" pgbouncer_postgresql_cluster_name: "data" -pgbouncer_postgresql_package_name_regex: 'postgresql.[{{ pgbouncer_postgresql_supported_versions | join(",") }}]-server' +pgbouncer_postgresql_package_name_regex: 'postgres.*[{{ pgbouncer_postgresql_supported_versions | join(",") }}]-server'