Execution
Date 10 Nov 2025 14:41:19 +0000
Duration 00:02:52.74
Controller ssh-gw-4.layershift.com
User root
Versions
Ansible 2.16.11
ara 1.7.3 / 1.7.3
Python 3.10.10
Summary
395 Hosts
3 Tasks
1165 Results
1 Plays
1 Files
0 Records

File: /home/ssh-gateway/ansible/kuly/zz-vik-364.yaml

---
- name: Playbook to get kcare version
  hosts: all
  gather_facts: false
  tasks:
    - name: Get kcare version
      ansible.builtin.shell: |
        set -o pipefail
        rpm -q --qf '%{VERSION}-%{RELEASE}\n' kernelcare
      args:
        executable: /bin/bash
      changed_when: false
      register: q_res
    - name: Extract the major version
      ansible.builtin.set_fact:
        major_version: "{{ q_res.stdout.split('.')[0] | int }}"
    - name: Show debug when version 2
      ansible.builtin.debug:
        "Kernelcare major version 2 detected on: {{ inventory_hostname }}"
      when: major_version == 2
      changed_when: major_version == 2