Add wait command to docker_container

This commit is contained in:
Łukasz Oleś 2016-01-14 10:17:28 +01:00
parent d51faddb24
commit 1f0b17937e
2 changed files with 15 additions and 6 deletions

View File

@ -35,3 +35,11 @@
{{ key }}: {{ value }}
{% endfor %}
{% endif %}
- name: Waiting for app in container
when: {{wait_cmd}}
shell: docker exec -t {{ resource_name }} {{wait_cmd}}
register: result
until: result.rc == 0
retries: 30
delay: 0.5

View File

@ -19,11 +19,12 @@ input:
env:
schema: {}
value: {}
# ssh_user:
# schema: str!
# value: []
# ssh_key:
# schema: str!
# value: []
wait_cmd:
schema: str
value: null
computable:
lang: jinja2
type: full
func: ""
tags: [resource/container]