o nnh@sHddlmZddlmZmZddlmZddlmZGdddeZ dS)) annotations) AnsibleActionAnsibleActionFail)get_action_args_with_defaults) ActionBasecs:eZdZdZdgdiZegdZdfdd ZZS) ActionModuleFsystemd)patternrunlevelsleep argumentsargs) openwrt_initservicersysvinitNc s4d|_d|_tt|||}~|jjdd}|dkr?z|jj r.|j d|jj }n|j d}Wn t y>Ynwzz|dkrc|j dtddd |d }|jd ||d idd}|rp|dksp|jj|srd }|dkr|jj}d|vr|d=||jvr|j|D]}||vr||=|jd||fq|jjj||jjd}t|j||jj|j |jjjjd}||jvrd|}|j d||!|j ||||jj"dnt#dWnt$y} z |!| j%WYd} ~ nd} ~ wwW|jj"s |&|j'j(j)|S|jj"s|&|j'j(j)ww)z handler for package operations Tuseautoz2{{hostvars['%s']['ansible_facts']['service_mgr']}}z{{ansible_facts.service_mgr}}zansible.legacy.setupz!allansible_service_mgr) gather_subsetfilter) module_name module_args task_varszFacts %s ansible_factszansible.legacy.servicez'Ignoring "%s" as it is not used in "%s")collection_list) action_groupszansible.legacy.z Running %s)rrr wrap_asyncz_Could not detect which service manager to use. Try gathering facts or setting the "use" option.N)*_supports_check_mode_supports_asyncsuperrrun_taskr getlower delegate_to_templartemplate Exception_execute_moduledict_displaydebug_shared_loader_obj module_loader has_plugincopy UNUSED_PARAMSwarningfind_plugin_with_context collectionsr resolved_fqcnmodule_defaults_parent_play_action_groupsBUILTIN_SVC_MGR_MODULESvvvvupdate async_valrrresult_remove_tmp_path _connection_shelltmpdir) selftmprr=modulefactsnew_module_argsunusedcontexte __class__I/usr/local/lib/python3.10/dist-packages/ansible/plugins/action/service.pyr %sp         zActionModule.run)NN) __name__ __module__ __qualname__TRANSFERS_FILESr0setr9r __classcell__rLrLrJrMrs  rN) __future__ransible.errorsrransible.executor.module_commonransible.plugins.actionrrrLrLrLrMs