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)