Created
December 20, 2017 15:13
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- 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