Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion ansible/snap-microk8s/snap-update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,23 @@
state: present
classic: true
channel: '{{ microk8s_version }}'
register: snap_update_result

- name: Restart each VM
ansible.builtin.reboot:
ansible.builtin.reboot:
when: snap_update_result.changed

- name: Ping all hosts after reboot
ansible.builtin.ping:
register: ping_after_reboot
when: snap_update_result.changed

- name: Check the k8s version
ansible.builtin.command: microk8s kubectl version
register: k8s_version
when: snap_update_result

- name: Print the k8s version
ansible.builtin.debug:
var: k8s_version.stdout_lines
when: k8s_version
Loading