Update 2 files
- /roles/npm/tasks/main.yml - /roles/heimdall/tasks/main.yml
This commit is contained in:
parent
6e089b3882
commit
fade4e8a2f
@ -14,20 +14,51 @@
|
||||
dest: "{{ heimdall_base_dir }}/docker-compose.yml"
|
||||
mode: 0644
|
||||
|
||||
- name: Pull and start Heimdall container
|
||||
community.docker.docker_compose_v2:
|
||||
project_src: "{{ heimdall_base_dir }}"
|
||||
state: present
|
||||
- name: Pull Heimdall Docker images
|
||||
shell: |
|
||||
cd {{ heimdall_base_dir }}
|
||||
docker compose pull
|
||||
args:
|
||||
executable: /bin/bash
|
||||
|
||||
- name: Start Heimdall container
|
||||
shell: |
|
||||
cd {{ heimdall_base_dir }}
|
||||
docker compose up -d
|
||||
args:
|
||||
executable: /bin/bash
|
||||
|
||||
- name: Wait for Heimdall to start
|
||||
pause:
|
||||
seconds: 10
|
||||
seconds: 15
|
||||
|
||||
- name: Check Heimdall container status
|
||||
community.docker.docker_container_info:
|
||||
name: heimdall
|
||||
shell: |
|
||||
docker ps --filter name=heimdall --format "json"
|
||||
register: heimdall_status
|
||||
changed_when: false
|
||||
|
||||
- name: Show Heimdall status
|
||||
debug:
|
||||
msg: "Heimdall status: {{ heimdall_status.container.Status }}"
|
||||
msg: "Heimdall container: {{ heimdall_status.stdout }}"
|
||||
|
||||
- name: Verify Heimdall is running
|
||||
shell: |
|
||||
docker ps --filter name=heimdall --filter status=running --quiet | wc -l
|
||||
register: heimdall_running
|
||||
changed_when: false
|
||||
|
||||
- name: Show Heimdall running status
|
||||
debug:
|
||||
msg: "Heimdall is running: {{ heimdall_running.stdout | int > 0 }}"
|
||||
|
||||
- name: Check Heimdall logs
|
||||
shell: |
|
||||
cd {{ heimdall_base_dir }}
|
||||
docker compose logs --tail=5
|
||||
register: heimdall_logs
|
||||
failed_when: false
|
||||
|
||||
- name: Show Heimdall logs
|
||||
debug:
|
||||
msg: "Heimdall logs: {{ heimdall_logs.stdout }}"
|
||||
@ -15,20 +15,51 @@
|
||||
dest: "{{ npm_base_dir }}/docker-compose.yml"
|
||||
mode: 0644
|
||||
|
||||
- name: Pull and start NPM container
|
||||
community.docker.docker_compose_v2:
|
||||
project_src: "{{ npm_base_dir }}"
|
||||
state: present
|
||||
- name: Pull NPM Docker images
|
||||
shell: |
|
||||
cd {{ npm_base_dir }}
|
||||
docker compose pull
|
||||
args:
|
||||
executable: /bin/bash
|
||||
|
||||
- name: Start NPM container
|
||||
shell: |
|
||||
cd {{ npm_base_dir }}
|
||||
docker compose up -d
|
||||
args:
|
||||
executable: /bin/bash
|
||||
|
||||
- name: Wait for NPM to start
|
||||
pause:
|
||||
seconds: 10
|
||||
seconds: 15
|
||||
|
||||
- name: Check NPM container status
|
||||
community.docker.docker_container_info:
|
||||
name: npm
|
||||
shell: |
|
||||
docker ps --filter name=npm --format "json"
|
||||
register: npm_status
|
||||
changed_when: false
|
||||
|
||||
- name: Show NPM status
|
||||
debug:
|
||||
msg: "NPM status: {{ npm_status.container.Status }}"
|
||||
msg: "NPM container: {{ npm_status.stdout }}"
|
||||
|
||||
- name: Verify NPM is running
|
||||
shell: |
|
||||
docker ps --filter name=npm --filter status=running --quiet | wc -l
|
||||
register: npm_running
|
||||
changed_when: false
|
||||
|
||||
- name: Show NPM running status
|
||||
debug:
|
||||
msg: "NPM is running: {{ npm_running.stdout | int > 0 }}"
|
||||
|
||||
- name: Check NPM logs
|
||||
shell: |
|
||||
cd {{ npm_base_dir }}
|
||||
docker compose logs --tail=5
|
||||
register: npm_logs
|
||||
failed_when: false
|
||||
|
||||
- name: Show NPM logs
|
||||
debug:
|
||||
msg: "NPM logs: {{ npm_logs.stdout }}"
|
||||
Loading…
Reference in New Issue
Block a user