Обновить ansible/npm-setup.yml
This commit is contained in:
+11
-1
@@ -155,10 +155,20 @@
|
|||||||
when: docker_compose_result is failed
|
when: docker_compose_result is failed
|
||||||
|
|
||||||
- name: Check if containers are running
|
- name: Check if containers are running
|
||||||
command: docker ps --filter "name=app" --format "table {{.Names}}\t{{.Status}}"
|
shell: docker ps --filter "name=app" --format "table {{.Names}}\t{{.Status}}"
|
||||||
register: container_status
|
register: container_status
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
|
- name: Display container status
|
||||||
|
debug:
|
||||||
|
msg: "{{ container_status.stdout_lines }}"
|
||||||
|
|
||||||
|
- name: Get container logs if needed
|
||||||
|
shell: docker logs npm_app_1 --tail 20
|
||||||
|
register: container_logs
|
||||||
|
changed_when: false
|
||||||
|
ignore_errors: yes
|
||||||
|
|
||||||
- name: Display access information
|
- name: Display access information
|
||||||
debug:
|
debug:
|
||||||
msg: |
|
msg: |
|
||||||
|
|||||||
Reference in New Issue
Block a user