Initial commit

This commit is contained in:
2026-04-19 00:12:26 +03:00
commit 7772b5cb77
8 changed files with 498 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
---
- name: Check k3s installation
hosts: k3s
become: true
vars_files:
- group_vars/k3s.yml
tasks:
- name: Check if k3s is installed
ansible.builtin.command: k3s --version
register: k3s_version
changed_when: false
failed_when: false
- name: Display k3s version
ansible.builtin.debug:
msg: "k3s version: {{ k3s_version.stdout }}"
when: k3s_version.rc == 0
- name: Display message if k3s is not installed
ansible.builtin.debug:
msg: "k3s is NOT installed on this host"
when: k3s_version.rc != 0