Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix database check #1391

Merged
merged 1 commit into from
Jun 29, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,11 @@
var: snapshot_name

- name: Check if database is running on node0 database server
block:
- name: Check on Debian
become: true
become_user: postgres
command: "pg_isready"
register: node0
ignore_errors: True
when: ansible_os_family == 'Debian'

- name: Check on RedHat
become: true
become_user: postgres
command: "/usr/pgsql-10/bin/pg_isready"
register: node0
ignore_errors: True
when: ansible_os_family == 'RedHat'
become: true
become_user: postgres
command: "{{ repmgr_pg_bindir[ansible_os_family] }}/pg_isready"
register: node0
ignore_errors: True
when: groups['postgresql'][0] == inventory_hostname

- name: Debug
Expand Down