Skip to content

Instantly share code, notes, and snippets.

use ansible to wait for a pg db to come up and start accepting connections
- name: wait for db to come up
shell: until /usr/bin/pg_isready; do sleep 1; done
args:
executable: /bin/bash
changed_when: false
delegate_to: "{{ database_host }}"
become_user: postgres
run_once: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment