diff --git a/resources/docker_container/1.0.0/actions/run.yaml b/resources/docker_container/1.0.0/actions/run.yaml index f0a6e96..c15be85 100644 --- a/resources/docker_container/1.0.0/actions/run.yaml +++ b/resources/docker_container/1.0.0/actions/run.yaml @@ -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 diff --git a/resources/docker_container/1.0.0/meta.yaml b/resources/docker_container/1.0.0/meta.yaml index 8526f15..55ee1bb 100644 --- a/resources/docker_container/1.0.0/meta.yaml +++ b/resources/docker_container/1.0.0/meta.yaml @@ -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]