in Ask

Could not detect which major revision of yum is in use

If you are working with Ansible and trying to run a playbook on a remote Linux machine, you may get the following error:

.....
fatal: [***.***.***.***]: FAILED! => {
    "changed": false, "msg": [
        "Could not detect which major revision of yum is in use, which is required to determine module backend.",
        "You can manually specify use_backend to tell the module whether to use the yum (yum3) or dnf (yum4) backend})"
    ]
}
....

This is due to the absence of the sudo privilege on the remote machine, just go and add the Ansible user to the sudoer file or add it to the correct group.

gpasswd-a ansible wheel

Share your thoughts

Comment