o nnh@sLddlmZdZddlZddlZddlmZddlmZGdddeZ dS)) annotationsaV name: su short_description: Substitute User description: - This become plugin allows your remote/login user to execute commands as another user via the su utility. author: ansible (@core) version_added: "2.8" options: become_user: description: User you 'become' to execute the task default: root ini: - section: privilege_escalation key: become_user - section: su_become_plugin key: user vars: - name: ansible_become_user - name: ansible_su_user env: - name: ANSIBLE_BECOME_USER - name: ANSIBLE_SU_USER keyword: - name: become_user become_exe: description: Su executable default: su ini: - section: privilege_escalation key: become_exe - section: su_become_plugin key: executable vars: - name: ansible_become_exe - name: ansible_su_exe env: - name: ANSIBLE_BECOME_EXE - name: ANSIBLE_SU_EXE keyword: - name: become_exe become_flags: description: Options to pass to su default: '' ini: - section: privilege_escalation key: become_flags - section: su_become_plugin key: flags vars: - name: ansible_become_flags - name: ansible_su_flags env: - name: ANSIBLE_BECOME_FLAGS - name: ANSIBLE_SU_FLAGS keyword: - name: become_flags become_pass: description: Password to pass to su required: False vars: - name: ansible_become_password - name: ansible_become_pass - name: ansible_su_pass env: - name: ANSIBLE_BECOME_PASS - name: ANSIBLE_SU_PASS ini: - section: su_become_plugin key: password prompt_l10n: description: - List of localized strings to match for prompt detection - If empty we'll use the built in one - Do NOT add a colon (:) to your custom entries. Ansible adds a colon at the end of each prompt; if you add another one in your string, your prompt will fail with a "Timeout" error. default: [] type: list elements: string ini: - section: su_become_plugin key: localized_prompts vars: - name: ansible_su_prompt_l10n env: - name: ANSIBLE_SU_PROMPT_L10N Nto_bytes) BecomeBasecs4eZdZdZdZgdZddZfddZZS) BecomeModulesu)zAuthentication failure) Passwordu암호uパスワード Adgangskodeu Contraseña ContrasenyauHasłoHeslouJelszóu Lösenordu Mật khẩuz Mot de passeParolaParool PasahitzaPassordPasswortSalasanaSandiSenha WachtwoorduססמהuЛозинкаu Паролаu Парольuगुप्तशब्दuशब्दकूटuసంకేతపదముuහස්පදයu密码u密碼u口令cCsN|dp|j}ddd|D}|td}tj|tjd}t||S)z; checks if the expected password prompt exists in b_output prompt_l10n|css|] }dt|VqdS)s (\w+\'s )?Nr).0prD/usr/local/lib/python3.10/dist-packages/ansible/plugins/become/su.py sz5BecomeModule.check_password_prompt..u ?(:|:) ?)flags) get_optionSU_PROMPT_LOCALIZATIONSjoinrrecompile IGNORECASEboolmatch)selfb_outputpromptsb_password_stringb_su_prompt_localizations_rerrrcheck_password_prompts  z"BecomeModule.check_password_promptcsntt|||d|_|s|S|dp|j}|dpd}|dp%d}|||}d|||t|fS)NT become_exe become_flags become_userz%s %s %s -c %s) superrbuild_become_commandpromptrname_build_success_commandshlexquote)r%cmdshellexeruser success_cmd __class__rrr0s z!BecomeModule.build_become_command) __name__ __module__ __qualname__r2failrr*r0 __classcell__rrr;rrds # r) __future__r DOCUMENTATIONr r4+ansible.module_utils.common.text.convertersransible.plugins.becomerrrrrrs W