That is a Rhel7 to RHEL 8 change. The default python in REHL7 is Python 2.7 while RHEL 8 is python3.6. I would also consider moving the subscription tasks to community.general.redhat_subscription module. That is should automatically change python version, but you may need to disconnect and reconnect to update the user environment.
On Wed, Feb 21, 2024 at 5:07 AM Prady A <[email protected]> wrote: > Hello all, > > > Upgrading from Rhel7-> 8 using ansible. In the pre upgrade task I > performed few checks like space check and yum update and > subscription-manager registration. No issues in the beginning tasks.. > > But when performing below task post reboot task Shell: > Yum clean all > Subscription-manager unsubscribe —all > Subscription-manager clean > > * It is giving me no such file /usr/bin/python * > > Before running the job In RHEl 7 the python version was pointing to > > Python2 /usr/bin/python-> /etc/alternatives/python > /etc/alternatives/python -> /usr/bin/python2 > > but after the above task is executed somehow it is changing to > /usr/bin/python-> /etc/alternatives/python /etc/alternatives/python -> > /usr/bin/python3 > > When I performed manually the task command there is no issue .. could you > pls suggest.. > > Regards > PD > > -- > 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/CAEuB3ApKqRhVmC3DzvX-EpBpebQCk5EKEq3CWkRv_uGH1ni50A%40mail.gmail.com > <https://groups.google.com/d/msgid/ansible-project/CAEuB3ApKqRhVmC3DzvX-EpBpebQCk5EKEq3CWkRv_uGH1ni50A%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- 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/CAEcFzYze6zADiEdjcLWUnoN4s5b42bXnmqdkBttF4nQCmYvozQ%40mail.gmail.com.
