ci / test (push) Failing after 22s
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
41 lines
1.5 KiB
YAML
41 lines
1.5 KiB
YAML
# 1. Images aus Docker in das containerd von k3s übernehmen (kein Neubau, kein Registry-Umweg)
|
|
- name: Images in k3s vorhanden?
|
|
ansible.builtin.command: /usr/local/bin/k3s ctr images ls -q
|
|
register: k3s_images
|
|
changed_when: false
|
|
|
|
- name: Images aus Docker importieren
|
|
ansible.builtin.shell: docker save {{ item }} | /usr/local/bin/k3s ctr images import -
|
|
loop: "{{ nex_speech_images }}"
|
|
when: ("docker.io/" ~ item) not in k3s_images.stdout
|
|
async: 1800
|
|
poll: 15
|
|
|
|
# 2. Compose-Stack anhalten (Host-Ports 8178/8179 werden frei), Dateien bleiben für den Rückweg
|
|
- name: Compose-Stack nex-speech anhalten
|
|
community.docker.docker_compose_v2:
|
|
project_src: "{{ nex_speech_dir }}"
|
|
state: stopped
|
|
when: nex_speech_compose_stop | default(true)
|
|
|
|
# 3. Manifeste anwenden und auf Bereitschaft warten (Probes prüfen /health in der VM)
|
|
- name: Manifeste anwenden
|
|
ansible.builtin.command: kubectl apply -f {{ nex_speech_k3s_manifests }}/
|
|
register: nex_apply
|
|
changed_when: "'configured' in nex_apply.stdout or 'created' in nex_apply.stdout"
|
|
delegate_to: localhost
|
|
become: false
|
|
|
|
- name: Warten, bis beide Deployments bereit sind
|
|
ansible.builtin.command: kubectl -n nex rollout status deployment/{{ item }} --timeout=600s
|
|
loop: [nex-stt, nex-tts]
|
|
changed_when: false
|
|
delegate_to: localhost
|
|
become: false
|
|
|
|
- name: Gesundheit in der VM prüfen
|
|
ansible.builtin.uri:
|
|
url: "http://127.0.0.1:{{ item }}/health"
|
|
status_code: 200
|
|
loop: [8178, 8179]
|