Okay! So, we have a bunch of proprietary software that we have to run on Centos 7. We’ve been using python3 for years. I’m trying to install an RPM with ansible yum module and it fails because python3. It suggests DNF, but hey, Centos7 doesn’t have DNF. Okay, I’ll just use builtin.command. Builtin.command says "Hey, you should use ‘yum’! If you don’t want this warning set warn: false. Docs say the ‘warn’ param of builtin.command is deprecated.
Is there something that takes over the job of warn:false now that warn:false is deprecated?
Is there some other way to install RPMs from yum repos on Centos7 that doesn’t involve installing python2 or using builtin.command or at least doesn’t give me warnings?
Thanks!
PS I love Ansible, and I love the way you aren’t afraid to change it to make it better.
Effectively, you have to use ansible_python_interpreter=/usr/bin/python for any tasks that interact with yum. This is because the yum python bindings are only available via the default system python 2 at /usr/bin/python
It can be set on a per task basis under vars: for that task, if you only want to drop down to Py2 for the yum tasks, but it will have to be explicitly set for every yum task.
Otherwise, just using the system python2 for everything on CentOS7 will be much easier to manage.