Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
4d31dda0e5
commit
d27385e3e1
@@ -85,9 +85,9 @@
|
|||||||
ansible.builtin.command: kubectl -n {{ ns }} rollout status deployment/portainer --timeout=300s
|
ansible.builtin.command: kubectl -n {{ ns }} rollout status deployment/portainer --timeout=300s
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: Version und Edition über NodePort (Knoten k3s)
|
- name: Version über NodePort (Knoten k3s, ohne Anmeldung)
|
||||||
ansible.builtin.uri:
|
ansible.builtin.uri:
|
||||||
url: "https://{{ hostvars['k3s'].ansible_host }}:30779/api/system/version"
|
url: "https://{{ hostvars['k3s'].ansible_host }}:30779/api/system/status"
|
||||||
validate_certs: false
|
validate_certs: false
|
||||||
return_content: true
|
return_content: true
|
||||||
register: ver
|
register: ver
|
||||||
@@ -95,9 +95,14 @@
|
|||||||
retries: 6
|
retries: 6
|
||||||
delay: 5
|
delay: 5
|
||||||
|
|
||||||
|
- name: Edition aus dem Startprotokoll (CE-Binary meldet sich als portainer/portainer, EE als portainer-ee)
|
||||||
|
ansible.builtin.shell: kubectl -n {{ ns }} logs deployment/portainer | grep -o 'image_tag=[^ ]*' | tail -1
|
||||||
|
register: tag
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
- name: Ergebnis
|
- name: Ergebnis
|
||||||
ansible.builtin.assert:
|
ansible.builtin.assert:
|
||||||
that:
|
that:
|
||||||
- ver.json.ServerEdition == 'CE'
|
- ver.json.Version == version
|
||||||
- ver.json.ServerVersion == version
|
- "'ee' not in tag.stdout"
|
||||||
success_msg: "Portainer {{ ver.json.ServerEdition }} {{ ver.json.ServerVersion }} unter https://{{ hostvars['k3s'].ansible_host }}:30779"
|
success_msg: "Portainer CE {{ ver.json.Version }} ({{ tag.stdout }}) unter https://{{ hostvars['k3s'].ansible_host }}:30779"
|
||||||
|
|||||||
Reference in New Issue
Block a user