diff --git a/salt/modules/yumpkg.py b/salt/modules/yumpkg.py index 9ccd66d105..890a78fb04 100644 --- a/salt/modules/yumpkg.py +++ b/salt/modules/yumpkg.py @@ -180,7 +180,10 @@ def _check_versionlock(): Ensure that the appropriate versionlock plugin is present ''' if _yum() == 'dnf': - vl_plugin = 'python-dnf-plugins-extras-versionlock' + if int(__grains__.get('osmajorrelease')) < 26: + vl_plugin = 'python-dnf-plugins-extras-versionlock' + else: + vl_plugin = 'python2-dnf-plugins-extras-versionlock' else: vl_plugin = 'yum-versionlock' \ if __grains__.get('osmajorrelease') == '5' \