o nnh@srddlmZddlmZmZddlmZddlmZddl m Z ddl m Z ddl mZe ZGdd d e Zd S) ) annotations) AnsibleActionAnsibleActionFail)get_action_args_with_defaults)PKG_MGRS) ActionBase)Display) combine_varscs0eZdZdZddeDZdfdd ZZS) ActionModuleFcCsh|]}|dqS)name).0managerr r I/usr/local/lib/python3.10/dist-packages/ansible/plugins/action/package.py !szActionModule.Nc sd|_d|_tt|||}|jjdd}zz|dkrr|jjr5|d|jj}t |jj |di}n|}|}|dd}|sr|did d rP|}d }n|j d t d d d|d}d }z|d|}Wn t yqtdw|r|dkr|jj|std||jj} d| vr| d=|jjj||jjd} t| j| |jj|j|jjjjd} ||jvrd|}td|||j || ||jj dntdWnt!y} z || j"WYd} ~ nd} ~ wwW|jj s|#|j$j%j&|S|jj s|#|j$j%j&ww)z handler for package operations Tuseautohostvarsdelegated_varsansible_package_useN ansible_factspkg_mgrFzansible.legacy.setupansible_pkg_mgrz!all)filter gather_subset) module_name module_args task_varsz?Could not detect a package manager. Try using the "use" option.z>Could not find a matching action for the "%s" package manager.)collection_list) action_groupszansible.legacy.z Running %s)rrr wrap_asyncz_Could not detect which package manager to use. Try gathering facts or setting the "use" option.)'_supports_check_mode_supports_asyncsuperr run_taskargsget delegate_tor vars_execute_moduledictKeyErrorr_shared_loader_obj module_loader has_plugincopyfind_plugin_with_context collectionsr resolved_fqcnmodule_defaults_templar_parent_play_action_groupsBUILTIN_PKG_MGR_MODULESdisplayvvvvupdate async_valrresult_remove_tmp_path _connection_shelltmpdir) selftmprr>module hosts_varstvarsfactspmgrnew_module_argscontexte __class__r rr$#sn         zActionModule.run)NN)__name__ __module__ __qualname__TRANSFERS_FILESrr9r$ __classcell__r r rMrr sr N) __future__ransible.errorsrransible.executor.module_commonr)ansible.module_utils.facts.system.pkg_mgrransible.plugins.actionransible.utils.displayransible.utils.varsr r:r r r r rs