403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /lib/python3.11/site-packages/ansible/cli/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /lib/python3.11/site-packages/ansible/cli/__pycache__/console.cpython-311.opt-1.pyc
�

���c�U��f�ddlmZmZmZeZddlmZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlmZddlmZddlmZddlmZddlmZmZdd	lmZdd
lmZddlmZddl m!Z!dd
l"m#Z#m$Z$ddl%m&Z&ddl'm(Z(ddl)m*Z*e*��Z+Gd�dee	j,��Z-dd�Z.e/dkre.��dSdS)�)�absolute_import�division�print_function)�CLIN)�	constants)�context)�option_helpers)�TaskQueueManager)�	to_native�to_text)�boolean)�parse_kv)�Play)�list_plugins)�
module_loader�fragment_loader)�plugin_docs)�stringc)�Displayc���eZdZdZdZgZddiZejpej	Z
�fd�Z�fd�Z�fd�Z
d�Zd	�Zd
�Zd�Zd6d
�Zd�Zd�Zd�Zd�Zd�Zd�ZeZeZd�Zd�Zd�Zd�Zd�Zd�Z d�Z!d�Z"d�Z#d�Z$d�Z%d�Z&d �Z'd!�Z(d"�Z)d#�Z*d$�Z+d%�Z,d&�Z-d'�Z.d(�Z/d)�Z0d*�Z1d+�Z2d,�Z3d-�Z4d.�Z5e4Z6e5Z7d/�Z8d0�Z9d1�Z:d2�Z;d3�Z<�fd4�Z=d5�Z>�xZ?S)7�
ConsoleCLIa�
       A REPL that allows for running ad-hoc tasks against a chosen inventory
       from a nice shell with built-in tab completion (based on dominis'
       ansible-shell).

       It supports several commands, and you can modify its configuration at
       runtime:

       - `cd [pattern]`: change host/group (you can use host patterns eg.: app*.dc*:!app01*)
       - `list`: list available hosts in the current path
       - `list groups`: list groups included in the current path
       - `become`: toggle the become flag
       - `!`: forces shell module instead of the ansible module (!yum update -y)
       - `verbosity [num]`: set the verbosity level
       - `forks [num]`: set the number of forks
       - `become_user [user]`: set the become_user
       - `remote_user [user]`: set the remote_user
       - `become_method [method]`: set the privilege escalation method
       - `check [bool]`: toggle check mode
       - `diff [bool]`: toggle diff mode
       - `timeout [integer]`: set the timeout of tasks in seconds (0 to disable)
       - `help [command/module]`: display documentation for the command or module
       - `exit`: exit ansible-console
    zansible-consolezhost-patternz�A name of a group in the inventory, a shell-like glob selecting hosts in inventory or any combination of the two separated by commas.c���tt|���|��d|_g|_g|_d|_d|_d|_t��|_
d|_d|_d|_
d|_d|_d|_d|_d|_d|_d|_t*j�|��dS)NzAWelcome to the ansible console. Type help or ? to list commands.
�*)�superr�__init__�intro�groups�hosts�pattern�variable_manager�loader�dict�	passwords�cwd�remote_user�become�become_user�
become_method�
check_mode�diff�forks�task_timeout�collections�cmd�Cmd)�self�args�	__class__s  ��8/usr/lib/python3.11/site-packages/ansible/cli/console.pyrzConsoleCLI.__init__Hs����
�j�$���(�(��.�.�.�Y��
������
���� $�������������� ���������!��������	���
� ����������������c����tt|���dd���tj|j��tj|j��tj|j��tj|j��tj	|j��tj
|j��tj|j��tj|j��tj
|j��tj|j��|j�ddddd���|j�d	d
dd�
��dS)Nz)REPL console for executing Ansible tasks.zgThis is not a live session/connection: each task is executed in the background and returns its results.)�desc�epilogrzhost pattern�all�?)�help�metavar�default�nargsz--step�step�
store_truez4one-step-at-a-time: confirm each task before running)�dest�actionr:)rr�init_parser�opt_help�add_runas_options�parser�add_inventory_options�add_connect_options�add_check_options�add_vault_options�add_fork_options�add_module_options�add_basedir_options�add_runtask_options�add_tasknoplay_options�add_argument)r0r2s �r3rBzConsoleCLI.init_parserdsL���
�j�$���+�+�<�|�	,�	
�	
�	
�	�"�4�;�/�/�/��&�t�{�3�3�3��$�T�[�1�1�1��"�4�;�/�/�/��"�4�;�/�/�/��!�$�+�.�.�.��#�D�K�0�0�0��$�T�[�1�1�1��$�T�[�1�1�1��'���4�4�4�	
�� � ����\a�il� �m�m�m��� � ���|�&\�	!�	^�	^�	^�	^�	^r4c���tt|���|��}|jt_|�|dd���|S)NT)�
runas_opts�	fork_opts)rr�post_process_args�	verbosity�display�validate_conflicts)r0�optionsr2s  �r3rSzConsoleCLI.post_process_argsysK����
�D�)�)�;�;�G�D�D��#�-�������D�D��I�I�I��r4c� �t|��S�N)�dir�r0s r3�	get_nameszConsoleCLI.get_namess���4�y�y�r4c��	tj�|��dS#t$r|���YdSt$r.|�d��|�|��YdSwxYw)Nz[Ansible-console was exited])r.r/�cmdloop�KeyboardInterrupt�EOFErrorrU�do_exitr[s r3r^zConsoleCLI.cmdloop�s���	��G�O�O�D�!�!�!�!�!�� �	�	�	��L�L�N�N�N�N�N�N��	�	�	��L�L�7�8�8�8��L�L��������	���s�#�A;�3A;�:A;c�V�|jptj��}|j�|j��|_d||jt|j��|jfz}|j	r|j
dvr|dz
}tj}n|dz
}|j
}t||d���|_dS)Nz%s@%s (%d)[f:%s])N�rootz# z$ T)�wrap_nonvisible_chars)r%�getpass�getuser�	inventory�
list_hostsr$�selected�lenr+r&r'�C�COLOR_ERROR�
NORMAL_PROMPTr�prompt)r0�
login_userrn�colors    r3�
set_promptzConsoleCLI.set_prompt�s����%�:���):�):�
���1�1�$�(�;�;��
�#�z�4�8�S���=O�=O�QU�Q[�&\�\���;�	'�4�+�~�=�=��d�N�F��M�E�E��d�N�F��&�E��f�e�4�H�H�H����r4c�,�td|j��S)N�module)rr-r[s r3�list_moduleszConsoleCLI.list_modules�s���H�d�&6�7�7�7r4Fc
��|�d��rdS|jst�d��dSd}|}|durF|���^}}tj|��r|}|rd�|��}nd}|jr|j}n+tj
rtjdkr
tj}nd	}d
}	|tjv}	tt|t||	������|j�
��}
td|jd|
g|j|j|j|j|j|j|j���}t/���||j|j���}nB#t6$r5}
t�dt9|
��z��Yd
}
~
dSd
}
~
wwxYw	d
|_	t=|j|j|j|j |tj
d|j!���|_|j�"|��}t�#|��|jr|j�$��|jr|j�%��nF#|jr|j�$��|jr|j�%��wwxYw|�t�d��dSd
S#tL$rt�d��YdSt6$rm}
|j'dkr0dd
l(}t�)|�*����t�t9|
����Yd
}
~
dSd
}
~
wwxYw)z actually runs modules �#Fz
No host found�shellT� �r<�minimalN)�	check_raw)rsr1)rA�timeoutz
Ansible Shell�no)�namer�gather_facts�tasksr%r&r'r(r)r*r-)r r!zUnable to build command: %s)rgr r!r#�stdout_callback�run_additional_callbacks�run_treer+zNo hosts foundzUser interrupted execution�r)+�
startswithr$rU�error�splitr�find_plugin�join�callbackrk�DEFAULT_LOAD_CALLBACK_PLUGINS�DEFAULT_STDOUT_CALLBACK�_ACTION_ALLOWS_RAW_ARGSr"rr,r%r&r'r(r)r*r-r�loadr r!�	Exceptionr�_tqmr
rgr#r+�run�debug�cleanup�cleanup_all_tmp_filesr_rT�	traceback�v�
format_exc)r0�line�
forceshellrs�module_args�possible_module�
possible_args�cb�resultr{�task�play_ds�play�er�s               r3r<zConsoleCLI.default�s����?�?�3���	��5��x�	��M�M�/�*�*�*��5������T�!�!�.2�j�j�l�l�+�O�m��(��9�9�
%�(�� �%�"%�(�(�=�"9�"9�K�K�"$�K��=�	���B�B�
�
,�	��1J�i�1W�1W��*�B�B��B���	��!�";�;�I��t�6���Xa�8b�8b�8b�c�c�c�mq�m~����D��$��h�!��f� �,��{� �,�"�0��?��Y� �,����G��6�6�;�;�w��9N�W[�Wb�;�c�c�D�D���	�	�	��M�M�8�7�1�:�:�E�F�F�F��5�5�5�5�5�����	����"	��D�I�
8�,�"�n�%)�%:��;�"�n�$&�-.�-L�"��*�	�	�	��	�����t�,�,���
�
�f�%�%�%��9�(��I�%�%�'�'�'��;�8��K�5�5�7�7�7����9�(��I�%�%�'�'�'��;�8��K�5�5�7�7�7�7�8�����~��
�
�.�/�/�/��u��~��!�	�	�	��M�M�6�7�7�7��5�5��	�	�	��~��"�"� � � � ��	�	�)�.�.�0�0�1�1�1��M�M�'�!�*�*�%�%�%��5�5�5�5�5�����	���sS�B3E:�:
F9�*F4�4F9�=K�A3I9�8AK�9AJ<�<K�$M<�	M<�A"M7�7M<c��dSrY�r[s r3�	emptylinezConsoleCLI.emptyline�s���r4c�2�|�|d��dS)a
        You can run shell commands through the shell module.

        eg.:
        shell ps uax | grep java | wc -l
        shell killall python
        shell halt -n

        You can use the ! to force the shell module. eg.:
        !ps aux | grep java | wc -l
        TN�r<�r0�args  r3�do_shellzConsoleCLI.do_shell�s��	
���S�$�����r4c�:�t�d��dS)Nz4You can run shell commands through the shell module.�rUr[s r3�
help_shellzConsoleCLI.help_shells�����N�O�O�O�O�Or4c�N�|r�	t|��}n>#t$r1t�d��|���YnwxYw|dkr||_|���dSt�d��dS|���dS)zSet the number of forkszInvalid argument for "forks"rz(forks must be greater than or equal to 1N)�int�	TypeErrorrUr��usage_forksr+rq)r0r�r+s   r3�do_forkszConsoleCLI.do_forkss����	�
#��C�������
#�
#�
#��
�
�<�=�=�=�� � �"�"�"�"�"�
#�����q�y�y�"��
����!�!�!�!�!���� J�K�K�K�K�K��������s��8A�Ac�b�t�d��|���dS)Nz'Set the number of forks to use per task)rUr�r[s r3�
help_forkszConsoleCLI.help_forkss-�����A�B�B�B��������r4c�:�t�d��dS)NzUsage: forks <number>r�r[s r3r�zConsoleCLI.usage_forkss�����/�0�0�0�0�0r4c��|dvrd|_nk|s|���nT|�d��}|D]<}|j�g|_|j�|������=|jr7t
�dd�|j��z��dSt
�d��dS)z.Set list of collections for 'short name' usage)ry�noneN�,z%Collections name search is set to: %sz, z)Collections name search is using defaults)r-�usage_collectionsr��append�striprUr�r�)r0r�r-�
collections    r3�do_collectionszConsoleCLI.do_collections$s����,���#�D����	<��"�"�$�$�$�$��)�)�C�.�.�K�)�
<�
<�
��#�+�')�D�$�� �'�'�
�(8�(8�(:�(:�;�;�;�;���	C��I�I�=��	�	�$�JZ�@[�@[�[�\�\�\�\�\��I�I�A�B�B�B�B�Br4c�b�t�d��|���dS)NzFSet the collection name search path when using short names for plugins)rUr�r[s r3�help_collectionszConsoleCLI.help_collections6s-�����`�a�a�a���� � � � � r4c�:�t�d��dS)NzgUsage: collections <collection1>[, <collection2> ...]
 Use empty quotes or "none" to reset to default.
r�r[s r3r�zConsoleCLI.usage_collections:s-�����D�	E�	E�	E�	E�	Er4c�B�|st�d��dS	t|��t_t�d|z��dS#tt
f$r5}t�dt|��z��Yd}~dSd}~wwxYw)zSet verbosity levelzUsage: verbosity <number>zverbosity level set to %sz)The verbosity must be a valid integer: %sN)rUr�rTr�r��
ValueErrorr�r)r0r�r�s   r3�do_verbosityzConsoleCLI.do_verbosity=s����	X��O�O�7�8�8�8�8�8�
X�$'��H�H��!��	�	�5��;�<�<�<�<�<���z�*�
X�
X�
X��
�
�I�G�TU�J�J�V�W�W�W�W�W�W�W�W�W�����
X���s�6A�B�)*B�Bc�:�t�d��dS)Nz@Set the verbosity level, equivalent to -v for 1 and -vvvv for 4.r�r[s r3�help_verbosityzConsoleCLI.help_verbosityHs�����Z�[�[�[�[�[r4c���|sd|_nH|dvrd|_n<|j�|��r||_nt�d��|���dS)a
            Change active host/group. You can use hosts patterns as well eg.:
            cd webservers
            cd webservers:dbservers
            cd webservers:!phoenix
            cd webservers:&staging
            cd webservers:dbservers:&staging:!phoenix
        rz/*r8zno host matchedN)r$rg�	get_hostsrUrqr�s  r3�do_cdzConsoleCLI.do_cdKsq���	/��D�H�H�
�D�[�[��D�H�H�
�^�
%�
%�c�
*�
*�	/��D�H�H��O�O�-�.�.�.��������r4c�b�t�d��|���dS)NzChange active host/group. )rU�usage_cdr[s r3�help_cdzConsoleCLI.help_cd_s&�����4�5�5�5��
�
�����r4c�:�t�d��dS)Nz'Usage: cd <group>|<host>|<host pattern>r�r[s r3r�zConsoleCLI.usage_cdcs�����A�B�B�B�B�Br4c��|s+|jD]!}t�|j���"dS|dkr&|jD]}t�|���dSt�d��|���dS)z#List the hosts in the current grouprzInvalid option passed to "list"N)rirUr~rr��	help_list)r0r��host�groups    r3�do_listzConsoleCLI.do_listfs����	��
�
+�
+������	�*�*�*�*�
+�
+�
�H�_�_���
'�
'������&�&�&�&�
'�
'�
�M�M�;�<�<�<��N�N�����r4c�:�t�d��dS)NzLList the hosts in the current group or a list of groups if you add 'groups'.r�r[s r3r�zConsoleCLI.help_listrs�����f�g�g�g�g�gr4c���|rNt|d���|_t�d|jz��|���dSt�d��dS)z$Toggle whether plays run with becomeF��strictzbecome changed to %sz.Please specify become value, e.g. `become yes`N)r
r&rUr�rqr�s  r3�	do_becomezConsoleCLI.do_becomeush���	N�!�#�e�4�4�4�D�K��I�I�,�t�{�:�;�;�;��O�O�������O�O�L�M�M�M�M�Mr4c�:�t�d��dS)Nz,Toggle whether the tasks are run with becomer�r[s r3�help_becomezConsoleCLI.help_become~s�����F�G�G�G�G�Gr4c�x�|r||_|���dSt�d��dS)z6Given a username, set the remote user plays are run byz5Please specify a remote user, e.g. `remote_user root`N)r%rqrUr�s  r3�do_remote_userzConsoleCLI.do_remote_user�sB���	U�"�D���O�O�������O�O�S�T�T�T�T�Tr4c�:�t�d��dS)Nz2Set the user for use as login to the remote targetr�r[s r3�help_remote_userzConsoleCLI.help_remote_user�s�����L�M�M�M�M�Mr4c��|r||_n<t�d��t�d|jz��|���dS)zFGiven a username, set the user that plays are run by when using becomez1Please specify a user, e.g. `become_user jenkins`zCurrent user is %sN)r'rUr�rqr�s  r3�do_become_userzConsoleCLI.do_become_user�sY���	?�"�D����O�O�O�P�P�P��I�I�*�T�-=�=�>�>�>��������r4c�:�t�d��dS)NznSet the user for use with privilege escalation (which remote user attempts to 'become' when become is enabled)r�r[s r3�help_become_userzConsoleCLI.help_become_user�s-�����I�	J�	J�	J�	J�	Jr4c���|r+||_t�d|jz��dSt�d��t�d|jz��dS)zLGiven a become_method, set the privilege escalation method when using becomezbecome_method changed to %sz7Please specify a become_method, e.g. `become_method su`zCurrent become_method is %sN)r(rUr�r�s  r3�do_become_methodzConsoleCLI.do_become_method�sh���	J�!$�D���I�I�3�d�6H�H�I�I�I�I�I��O�O�U�V�V�V��I�I�3�d�6H�H�I�I�I�I�Ir4c�:�t�d��dS)NzASet the privilege escalation plugin to use when become is enabledr�r[s r3�help_become_methodzConsoleCLI.help_become_method�s�����[�\�\�\�\�\r4c��|r:t|d���|_t�d|jz��dSt�d��t�d|jz��dS)z(Toggle whether plays run with check modeFr�zcheck mode changed to %sz1Please specify check mode value, e.g. `check yes`zcheck mode is currently %s.N)r
r)rUr�r�s  r3�do_checkzConsoleCLI.do_check�sr���	G�%�c�%�8�8�8�D�O��O�O�6���H�I�I�I�I�I��O�O�O�P�P�P��I�I�3�d�o�E�F�F�F�F�Fr4c�:�t�d��dS)NzToggle check_mode for the tasksr�r[s r3�
help_checkzConsoleCLI.help_check�s�����9�:�:�:�:�:r4c��|r:t|d���|_t�d|jz��dSt�d��t�d|jz��dS)z"Toggle whether plays run with diffFr�zdiff mode changed to %sz-Please specify a diff value , e.g. `diff yes`zdiff mode is currently %sN)r
r*rUr�r�s  r3�do_diffzConsoleCLI.do_diff�sq���	?���E�2�2�2�D�I��O�O�5��	�A�B�B�B�B�B��O�O�K�L�L�L��I�I�1�D�I�=�>�>�>�>�>r4c�:�t�d��dS)Nz Toggle diff output for the tasksr�r[s r3�	help_diffzConsoleCLI.help_diff�s�����:�;�;�;�;�;r4c�<�|r�	t|��}|dkrt�d��n	||_dSdS#tt
f$r5}t�dt
|��z��Yd}~dSd}~wwxYw|���dS)zSet the timeoutrz@The timeout must be greater than or equal to 1, use 0 to disablezAThe timeout must be a valid positive integer, or 0 to disable: %sN)r�rUr�r,r�r�r�
usage_timeout)r0r�r|r�s    r3�
do_timeoutzConsoleCLI.do_timeout�s����
	!�
p��c�(�(���Q�;�;��M�M�"d�e�e�e�e�(/�D�%�%�%�f�e���z�*�
p�
p�
p��
�
�a�dk�lm�dn�dn�n�o�o�o�o�o�o�o�o�o�����
p����
��� � � � � s�7?�B�*B�Bc�b�t�d��|���dS)NzSet task timeout in seconds)rUr�r[s r3�help_timeoutzConsoleCLI.help_timeout�s-�����5�6�6�6��������r4c�:�t�d��dS)NzUsage: timeout <seconds>r�r[s r3r�zConsoleCLI.usage_timeout�s�����2�3�3�3�3�3r4c�D�tj�d��dS)zExits from the consolez
Ansible-console was exited.
���)�sys�stdout�write)r0r1s  r3razConsoleCLI.do_exit�s���
���:�;�;�;��rr4c�:�t�d��dS)NzLEAVE!r�r[s r3�	help_exitzConsoleCLI.help_exit�s������!�!�!�!�!r4c�D�|�rtj|��}|r�tj|t��\}}}}|r�t
�|d��t
�d��|d���D]P}t
�dt||j��zdz|d|ddz���QdSt
�	d|z��dSt
�	d	|z��dSdS)
N�short_descriptionzParameters:rWz  rx�descriptionrzNo documentation found for %s.z<%s is not a valid command, use ? to list all valid commands.)
rr�r�
get_docstringrrU�keysrrmr�)r0�module_name�in_path�oc�a�_dummy1�_dummy2�opts        r3�helpdefaultzConsoleCLI.helpdefault�s5���	l�#�/��<�<�G��

l�*5�*C�G�_�*]�*]�'��A�w���R��O�O�B�':�$;�<�<�<��O�O�M�2�2�2�!�)�}�1�1�3�3�~�~������w�s�D�<N�/O�/O�(O�RU�(U�XZ�[d�Xe�fi�Xj�kx�Xy�z{�X|�(|�}�}�}�}�~�~��M�M�"B�[�"P�Q�Q�Q�Q�Q��
�
�\�_j�j�k�k�k�k�k�	l�	lr4c�:�t�d��dS)NzDon't be redundant!)rU�warningr[s r3�	help_helpzConsoleCLI.help_help�s�����-�.�.�.�.�.r4c����|�d��d�t���t|��z
�|jdvr|j|jz}n)d�|j�|j��D��}��fd�|D��S)Nrx�)r8r�\c��g|]	}|j��
Sr��r~��.0�xs  r3�
<listcomp>z*ConsoleCLI.complete_cd.<locals>.<listcomp>�s��O�O�O�a�1�6�O�O�Or4c���g|]H}t|���t������1t|���d���ISrY)rr��r�s�mline�offss  ��r3rz*ConsoleCLI.complete_cd.<locals>.<listcomp>�sK���f�f�f��I�a�L�L�<S�<S�T]�^c�Td�Td�<e�<e�f�	�!���T�U�U�#�f�f�fr4)�	partitionrjr$rrrgrh�r0�textr��begidx�endidx�completionsrrs      @@r3�complete_cdzConsoleCLI.complete_cd�s��������s�#�#�A�&���5�z�z�C��I�I�%���8�)�)�)��*�t�{�2�K�K�O�O�4�>�+D�+D�T�X�+N�+N�O�O�O�K�f�f�f�f�f�[�f�f�f�fr4c�R���|���d|���vrv|�d��d�t���t|��z
�|�|���d��}��fd�|D��SdS)Nrrxr�c�T��g|]$}|�����|�d�dz��%S)N�=)r�rs  ��r3rz.ConsoleCLI.completedefault.<locals>.<listcomp>�s6���O�O�O�q�1�<�<��;N�;N�O�A�d�e�e�H�s�N�O�O�Or4)r�rtrjr�rs      @@r3�completedefaultzConsoleCLI.completedefault�s������:�:�<�<��?�d�/�/�1�1�1�1��J�J�s�O�O�B�'�E��u�:�:��D�	�	�)�D��*�*�4�:�:�<�<��?�;�;�K�O�O�O�O�O�K�O�O�O�O�2�1r4c��tj|��}tj|td���\}}}}t|d�����S)NT)�	is_modulerW)rr�rr�r�listr�)r0r�rrrrrs       r3r�zConsoleCLI.module_argssQ���+�K�8�8��"-�";�G�_�`d�"e�"e�"e���A�w���B�y�M�&�&�(�(�)�)�)r4c�L���tt������d}d}tjd�_�j�_tjd�_tjd�_tjd�_	tjd�_
tjd�_tjd�_tjd�_
tjd	�_tjd
r+tjd
D]}|rtj|��������_�jD]4}t'�d|z|f�fd�	��t'�d
|z|f�fd�	���5����\}}||d��_����\�_�_�_���jtjd�j��}�j����_d�|D���_dt<jvrt=j d��nt=j d��tBj"�#tBj"�$d��d��}	t=j%|��n#tL$rYnwxYwtOj(t<j)|����*����+��dS)Nrr%r&r'r(�checkr*r+r,�module_path�do_c�:����|dz|z��S�Nrxr��r�rsr0s  �r3�<lambda>z ConsoleCLI.run.<locals>.<lambda>$s ���T�\�\�RX�[^�R^�ad�Rd�Ee�Ee�r4�help_c�.����|��SrY�r�rsr0s �r3r-z ConsoleCLI.run.<locals>.<lambda>%s���$�BR�BR�SY�BZ�BZ�r4)�	conn_pass�become_pass�subsetc��g|]	}|j��
Sr�rrs  r3rz"ConsoleCLI.run.<locals>.<listcomp>/s��,�,�,��a�f�,�,�,r4�libeditzbind ^I rl_completez
tab: complete�~z.ansible-console_history),rrr�r�CLIARGSrr$r%r&r'r(r)r*r+r,r�
add_directoryrt�modules�setattr�
ask_passwordsr#�
_play_prereqsr!rgr �
get_host_list�list_groupsrr�readline�__doc__�parse_and_bind�os�pathr��
expanduser�read_history_file�IOError�atexit�register�write_history_filerqr^)r0�sshpass�
becomepassrDrsr�histfiler2s`      �r3r�zConsoleCLI.runs�����
�j�$���#�#�%�%�%����
���y�1����<���#�?�=�9����o�h�/���"�?�=�9���$�_�_�=���!�/�'�2����O�F�+��	��_�W�-��
�#�O�N�;����?�=�)�	6���
�6�
6�
6���6�!�/��5�5�5���(�(�*�*����l�	\�	\�F��D�%�&�.�V�*e�*e�*e�*e�*e�f�f�f��D�'�F�*�&�,Z�,Z�,Z�,Z�,Z�[�[�[�[� $� 2� 2� 4� 4���*�'.�z�J�J���=A�=O�=O�=Q�=Q�:���T�^�T�%:��"�"�4�>�7�?�8�3L�d�l�[�[���n�0�0�2�2���,�,�e�,�,�,��
���(�(�(��#�$9�:�:�:�:��#�O�4�4�4��7�<�<��� 2� 2�3� 7� 7�9S�T�T��	��&�x�0�0�0�0���	�	�	��D�	����	���3�X�>�>�>��������������s�8K
�
K�Kc���d}|�d��r\|�dd��}tj|��r1t	�||f�fd�	��t
��|��}np|�d��r[|�dd��}tj|��r1t	�||f�fd�	��t
��|��}|�t�j�d|�d����|S)	z[ handle not found to populate dynamically a module function if module matching name exists Nr)ryc�:����|dz|z��Sr+r�r,s  �r3r-z(ConsoleCLI.__getattr__.<locals>.<lambda>Is���t�|�|�F�UX�L�[^�L^�?_�?_�r4r.c�.����|��SrYr0r1s �r3r-z(ConsoleCLI.__getattr__.<locals>.<lambda>Ns���$�:J�:J�6�:R�:R�r4z does not have a z
 attribute)	r��replacerr�r;�object�__getattr__�AttributeErrorr2)r0r~�attrrss`   r3rSzConsoleCLI.__getattr__Bs������?�?�5�!�!�		6��\�\�%��,�,�F��(��0�0�
6���d�v�$_�$_�$_�$_�$_�`�`�`��)�)�$��5�5���
�_�_�W�
%�
%�	6��\�\�'�2�.�.�F��(��0�0�
6���d�&�$R�$R�$R�$R�$R�S�S�S��)�)�$��5�5���<� �D�N�!U�!U�T�!U�!U�!U�V�V�V��r4)F)@�__name__�
__module__�__qualname__rAr~r:�	ARGUMENTSrk�COLOR_CONSOLE_PROMPT�COLOR_HIGHLIGHTrmrrBrSr\r^rqrtr<r�r�r�r�r�r��	do_serial�help_serialr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rar��do_EOF�help_EOFrr	rr"r�r�rS�
__classcell__)r2s@r3rr&s����������2�D��G��"s�t�I��*�?�a�.?�M������8^�^�^�^�^�*��������	�	�	�
I�
I�
I�8�8�8�V�V�V�V�p��� � � �P�P�P����$���1�1�1��I��K�C�C�C�$!�!�!�E�E�E�	X�	X�	X�\�\�\����(���C�C�C�
�
�
�h�h�h�N�N�N�H�H�H�U�U�U�N�N�N����J�J�J�J�J�J�]�]�]�G�G�G�;�;�;�?�?�?�<�<�<�!�!�!����4�4�4����
"�"�"��F��H�
l�
l�
l�/�/�/�	g�	g�	g�P�P�P�*�*�*�
:�:�:�:�:�x������r4rc�:�t�|��dSrY)r�cli_executor)r1s r3�mainrcWs�����D�!�!�!�!�!r4�__main__rY)0�
__future__rrr�type�
__metaclass__�ansible.clirrHr.rer@rCr��ansiblerrkr�ansible.cli.argumentsr	rC�#ansible.executor.task_queue_managerr
�ansible.module_utils._textrr�)ansible.module_utils.parsing.convert_boolr
�ansible.parsing.splitterr�ansible.playbook.playr�ansible.plugins.listr�ansible.plugins.loaderrr�
ansible.utilsr�ansible.utils.colorr�ansible.utils.displayrrUr/rrcrVr�r4r3�<module>rus���C�B�B�B�B�B�B�B�B�B��
�������
�
�
�
�
�
�
�
���������	�	�	�	�
�
�
�
�"�"�"�"�"�"�������<�<�<�<�<�<�@�@�@�@�@�@�9�9�9�9�9�9�9�9�=�=�=�=�=�=�-�-�-�-�-�-�&�&�&�&�&�&�-�-�-�-�-�-�A�A�A�A�A�A�A�A�%�%�%�%�%�%�'�'�'�'�'�'�)�)�)�)�)�)�
�'�)�)��n�n�n�n�n��c�g�n�n�n�b"�"�"�"��z����D�F�F�F�F�F��r4

Youez - 2016 - github.com/yon3zu
LinuXploit