Execution
Date 10 Sep 2024 17:11:54 +0100
Duration 00:00:57.51
Controller ssh-gw-4.layershift.com
User root
Versions
Ansible 2.16.4
ara 1.7.1 / 1.7.1
Python 3.10.10
Summary
138 Hosts
3 Tasks
414 Results
1 Plays
6 Files
0 Records

File: /home/ssh-gateway/ansible/roles/cloudlinux/tasks/main.yml

---
# tasks file for CloudLinux

- name: Get the CL version
  ansible.builtin.shell: |
    set -o pipefail
    if [ -f /etc/cloudlinux-release ]; then
      cat /etc/cloudlinux-release | grep "CloudLinux" | awk -F 'release ' '{print $2}' | awk '{print $1}'
    fi
  args:
    executable: /bin/bash
  register: cloudlinux_output
  changed_when: false

- name: Set CloudLinux facts
  ansible.builtin.set_fact:
    cloudlinux_found: "{{ cloudlinux_output.stdout is not none and cloudlinux_output.stdout != '' }}"
    cloudlinux_version: "{{ cloudlinux_output.stdout if cloudlinux_output.stdout is not none else 'unknown' }}"
  when: cloudlinux_output.stdout is not none