Dashboard
PHP:
8.2.30
OS:
Linux
User:
dh_nv8b2m
/
/
usr
/
local
/
lib
/
python3.10
/
dist-packages
/
ansible
/
plugins
/
become
/
__pycache__
📤 Upload
📝 New File
📁 New Folder
Close
Editing: su.cpython-310.pyc
o O�h� � @ sL d dl mZ dZd dlZd dlZd dlmZ d dlmZ G dd� de�Z 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 N��to_bytes)� BecomeBasec s4 e Zd ZdZdZg d�Zdd� Z� fdd�Z� ZS )�BecomeModule�su)zAuthentication failure) �Passwordu 암호u パスワード�Adgangskodeu Contraseña�Contrasenyau Hasło�Heslou Jelszóu Lösenordu Mật khẩuzMot de passe�Parola�Parool� Pasahitza�Passord�Passwort�Salasana�Sandi�Senha� Wachtwoordu ססמהu Лозинкаu Паролаu Парольu गुप्तशब्दu शब्दकूटu సంకేతపదముu හස්පදයu 密码u 密碼u 口令c C sN | � d�p| j}d�dd� |D ��}|td� }tj|tjd�}t|�|��S )z; checks if the expected password prompt exists in b_output �prompt_l10n� |c s s � | ] }d t |� V qdS )s (\w+\'s )?Nr )�.0�p� r �D/usr/local/lib/python3.10/dist-packages/ansible/plugins/become/su.py� <genexpr>� s � z5BecomeModule.check_password_prompt.<locals>.<genexpr>u ?(:|:) ?)�flags) � get_option�SU_PROMPT_LOCALIZATIONS�joinr �re�compile� IGNORECASE�bool�match)�self�b_output�prompts�b_password_string�b_su_prompt_localizations_rer r r �check_password_prompt� s z"BecomeModule.check_password_promptc sn t t| ��||� d| _|s|S | �d�p| j}| �d�pd}| �d�p%d}| �||�}d|||t�|�f S )NT� become_exe�become_flags� �become_userz%s %s %s -c %s) �superr �build_become_command�promptr �name�_build_success_command�shlex�quote)r% �cmd�shell�exer �user�success_cmd�� __class__r r r0 � s z!BecomeModule.build_become_command) �__name__� __module__�__qualname__r2 �failr r* r0 � __classcell__r r r; r r d s # r ) � __future__r � DOCUMENTATIONr r4 �+ansible.module_utils.common.text.convertersr �ansible.plugins.becomer r r r r r �<module> s W
Save
Cancel