What's your version of python2-dnf?
base.update_cache was introduced in 2.1.0-1.
On 11/20/18 11:25 AM, Oliver Riesener wrote:
> Hi,
>
> i found an permanent updates avail on centos 7.5 host with ovirt
> 4.2.7.5-1-el7 and ansible 2.7.1+.
>
> Background: ansible 2.7.1+ "auto use" the yum: backend.
>
> The new avail backend and auto selected backend "yum 4" uses
"dnf" and
> didn't
> recognize the attribute "update_cache: yes" in yum: ansible task.
>
> #### Solution:
>
> * switch backend to old yum style.
>
> # diff
> /usr/share/ovirt-engine/playbooks/roles/ovirt-host-upgrade/tasks/main.yml.orig
> /usr/share/ovirt-engine/playbooks/roles/ovirt-host-upgrade/tasks/main.yml
> 11a12
> > use_backend: yum
>
> * on ovirt node the file and the problem didn't exists.
>
> best regards.
>
>
> TASK [ovirt-host-upgrade : Install ovirt-host package if it isn't
> installed]
>
******************************************************************************************************************
>
> task path:
> /usr/share/ovirt-engine/playbooks/roles/ovirt-host-upgrade/tasks/main.yml:8
> fatal: [
ovn-elem.example.org]: FAILED! => {"ansible_facts":
{"pkg_mgr":
> "dnf"}, "changed": false, "module_stderr": "Shared
connection to
>
ovn-elem.example.org closed.\r\n", "module_stdout": "Traceback
(most
> recent call last):\r\n File
>
\"/root/.ansible/tmp/ansible-tmp-1542705098.43-115863495291729/AnsiballZ_dnf.py\",
> line 113, in <module>\r\n _ansiballz_main()\r\n File
>
\"/root/.ansible/tmp/ansible-tmp-1542705098.43-115863495291729/AnsiballZ_dnf.py\",
> line 105, in _ansiballz_main\r\n invoke_module(zipped_mod, temp_path,
> ANSIBALLZ_PARAMS)\r\n File
>
\"/root/.ansible/tmp/ansible-tmp-1542705098.43-115863495291729/AnsiballZ_dnf.py\",
> line 48, in invoke_module\r\n imp.load_module('__main__', mod,
> module, MOD_DESC)\r\n File
> \"/tmp/ansible_dnf_payload_KN71mV/__main__.py\", line 1079, in
> <module>\r\n File \"/tmp/ansible_dnf_payload_KN71mV/__main__.py\",
line
> 1068, in main\r\n File \"/tmp/ansible_dnf_payload_KN71mV/__main__.py\",
> line 1044, in run\r\n File
> \"/tmp/ansible_dnf_payload_KN71mV/__main__.py\", line 570, in
> _base\r\nAttributeError: 'Base' object has no attribute
> 'update_cache'\r\n", "msg": "MODULE FAILURE\nSee
stdout/stderr for the
> exact error", "rc": 1}
> _______________________________________________
> Users mailing list -- users(a)ovirt.org
> To unsubscribe send an email to users-leave(a)ovirt.org
> Privacy Statement:
https://www.ovirt.org/site/privacy-policy/
> oVirt Code of Conduct:
>
https://www.ovirt.org/community/about/community-guidelines/
> List Archives:
>
https://lists.ovirt.org/archives/list/users@ovirt.org/message/MKQXH2WXICT...
>