The error was: error while evaluating conditional (ansible_python_version is 
version('3', '<')): 'ansible_python_version' is undefined

I don't know why that would not be defined, but that is causing your error.

Walter
--
Walter Rowe, Division Chief
Infrastructure Services, OISM
Mobile: 202.355.4123

On Jan 5, 2023, at 4:28 AM, Kannan <[email protected]> wrote:

Dear Team,

I am new to Ansible and i am getting the following erro while running " 
rhel-system-roles.selinux". Could you please help to resolve this error.

Environment:
RHEL-  9
Ansible core - 2.12.2
 python version = 3.9.10

TASK [rhel-system-roles.selinux : Install SELinux python2 tools] 
*********************************************************
fatal: [ss1]: FAILED! => {"msg": "The conditional check 'ansible_python_version 
is version('3', '<')' failed. The error was: error while evaluating conditional 
(ansible_python_version is version('3', '<')): 'ansible_python_version' is 
undefined\n\nThe error appears to be in 
'/usr/share/ansible/roles/rhel-system-roles.selinux/tasks/main.yml': line 2, 
column 3, but may\nbe elsewhere in the file depending on the exact syntax 
problem.\n\nThe offending line appears to be:\n\n---\n- name: Install SELinux 
python2 tools\n  ^ here\n"}

Thanks & Regards,
Kannan Ravi

--
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
[email protected]<mailto:[email protected]>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/d5dd49f4-1cda-4272-afcd-85404c5bdf1bn%40googlegroups.com<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fansible-project%2Fd5dd49f4-1cda-4272-afcd-85404c5bdf1bn%2540googlegroups.com%3Futm_medium%3Demail%26utm_source%3Dfooter&data=05%7C01%7Cwalter.rowe%40nist.gov%7C99d463ef4aae4abb2df508daeeff5c10%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C638085077784689167%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=UvoP8wdp7upoFEDy6oAbjlnBrcMaobRjHyftCtTj%2BqQ%3D&reserved=0>.

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/E7155709-E82E-4744-8A23-DB2F3D839A3D%40nist.gov.

Reply via email to