Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save magicrobotmonkey/c05e271c94a6a193afc38ad86f009097 to your computer and use it in GitHub Desktop.
Save magicrobotmonkey/c05e271c94a6a193afc38ad86f009097 to your computer and use it in GitHub Desktop.
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