Error in RHEL System Roles [SELinux]

91 views
Skip to first unread message

Taha Adel

unread,
Dec 8, 2021, 12:00:33 PM12/8/21
to Ansible Project
Hi Team,

I'm trying to practice rhel-system-roles and when I run the selinux roles, I'm getting the following error message

fatal: [ansible-01.example.com]: FAILED! => {"msg": "The conditional check 'ansible_python_version is version('3', '<')' failed. The error was: Version comparison: '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"}

The error is related to the first task in the role that should install SElinux package depending on the python version on the managed hosts, but the ansible_python_version variable is not defined. My question is this variable an ansible fact that should be gathered from the managed host or it's just a bug or what?

Thanks

Richard Megginson

unread,
Dec 8, 2021, 12:05:38 PM12/8/21
to ansible...@googlegroups.com
What version of rhel-system-roles are you using? What version of ansible are you using?  What is your controller node platform?


Thanks

--
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 ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/9c1c0374-ceb3-4cd4-9e1f-5e782beb5632n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages