o nnh@sRddlmZddlmZddlmZddlmZeZe dZ GdddeZ dS) ) annotations)AnsibleActionFail) ActionBase)Display)yumyum4dnfdnf4dnf5cs"eZdZdZdfdd ZZS) ActionModuleFNcsd|_d|_tt|||}~d|jjvr d|jjvr td|jjd|jjdd}|dvrSz|jj rB|j d|jj }n|j d}Wn t yRYnw|t vr|jd td d d |d }td||did d}|jj r||jjr|dkrd|i|d<|t vr|dddnE|dvrd}d|}|jj|s|dd|dn)|jj}d|vr|d=d|vr|d=td|||j||||jjd|jjs||jjj|S)NTuse use_backendz9parameters are mutually exclusive: ('use', 'use_backend')auto>rrz.{{hostvars['%s']['ansible_facts']['pkg_mgr']}}z{{ansible_facts.pkg_mgr}}zansible.legacy.setupansible_pkg_mgrz!all)filter gather_subset) module_name module_args task_varszFacts %s ansible_factspkg_mgr)zfCould not detect which major revision of dnf is in use, which is required to determine module backend.zdYou should manually specify use_backend to tell the module whether to use the dnf4 or dnf5 backend}))failedmsg>r rrzansible.legacy.z+Could not find a dnf module backend for %s.z3Running %s as the backend for the dnf action plugin)rrr wrap_async)_supports_check_mode_supports_asyncsuperr run_taskargsrget delegate_to_templartemplate ExceptionVALID_BACKENDS_execute_moduledictdisplaydebugdelegate_factsupdate_shared_loader_obj module_loader has_plugincopyvvvv async_val_remove_tmp_path _connection_shelltmpdir)selftmprresultmodulefactsnew_module_args __class__E/usr/local/lib/python3.10/dist-packages/ansible/plugins/action/dnf.pyrs`       zActionModule.run)NN)__name__ __module__ __qualname__TRANSFERS_FILESr __classcell__r>r>r<r?r sr N) __future__ransible.errorsransible.plugins.actionransible.utils.displayrr( frozensetr%r r>r>r>r?s