Skip to content

Commit

Permalink
Merge branch 'master' into cloud
Browse files Browse the repository at this point in the history
  • Loading branch information
vitabaks committed Dec 18, 2023
2 parents bb2252e + 139f567 commit b67570d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion roles/pgbouncer/config/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@
'; done
args:
executable: /bin/bash
when: pgbouncer_auth_user|bool and is_master|bool
when:
- pgbouncer_auth_user | bool
- (is_master | bool and patroni_standby_cluster.host | default('') | length < 1) # do not perform on the Standby Cluster leader
tags: pgbouncer, pgbouncer_conf, pgbouncer_auth_query

...
8 changes: 4 additions & 4 deletions roles/postgresql-users/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
loop_control:
label: "{{ item.name }}"
when:
- postgresql_users is defined
- postgresql_users | length > 0
- postgresql_users | default('') | length > 0
- item.password | default('') | length > 0 # Ensure the password is not empty
- patroni_standby_cluster.host | default('') | length < 1 # do not perform on the Standby Cluster leader
tags: postgresql_users

- name: Grant roles to users
Expand All @@ -38,9 +38,9 @@
loop_control:
label: "{{ item.name }}"
when:
- postgresql_users is defined
- postgresql_users | length > 0
- postgresql_users | default('') | length > 0
- item.role | default('') | length > 0
- patroni_standby_cluster.host | default('') | length < 1 # do not perform on the Standby Cluster leader
tags: postgresql_users

...

0 comments on commit b67570d

Please sign in to comment.