0

I just realized that on my few servers is ansible_distribution_major_version not recognized in some Red Hat 6.10.

I am getting NA results. But on some other Red Hat 6.10 it is working fine.

Any idea ?

---
- hosts: all

  tasks:

  - name: check version
    debug:
      msg: "{{ ansible_distribution }}_{{ ansible_distribution_major_version }}"

Output

TASK [Gathering Facts] ****************
task path: /play_check_os_version.yml:2
ok: [host01]
META: ran handlers

TASK [check version] ******************
task path: /play_check_os_version.yml:8
ok: [host01] => {
    "msg": "RedHat_NA"

redhat-release on Target Host is

#cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.10 (Santiago)
U880D
  • 8,601
  • 6
  • 24
  • 40
andrew
  • 459
  • 5
  • 21
  • Can you provide the debug output as shown under [Getting full name of the OS using Ansible facts](https://stackoverflow.com/a/71035723/6771046), as well from `{{ ansible_lsb }}` and `{{ ansible_lsb.description }}`? So just guessing, since there is not enough information provided, some missing LSB packages? – U880D Jun 28 '23 at 08:39

0 Answers0