Skip to content

Commit cf6773b

Browse files
committed
Fix container start
1 parent 1bb4d9f commit cf6773b

1 file changed

Lines changed: 2 additions & 11 deletions

File tree

  • ansible/roles/wait_for_container_exit/tasks

ansible/roles/wait_for_container_exit/tasks/main.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,9 @@
66
register: container_ids
77

88
- name: wait for container to stop
9-
become: yes
10-
script: findTagRunning.sh {{ container_image }}
11-
register: result
129
tags: deploy
13-
until: result.stdout_lines|length == 0
14-
retries: 100
15-
delay: 1
16-
17-
- name: get container exit code
18-
tags: deploy
19-
become: true
20-
command: docker inspect -f {% raw %}{{.State.ExitCode}}{% endraw %} {{ container_ids.stdout_lines[0] }}
10+
become: yes
11+
command: docker wait {{ container_ids.stdout | trim }}
2112
register: container_exit_code
2213

2314
- name: get logs

0 commit comments

Comments
 (0)