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/plugins/lookup/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /lib/python3.11/site-packages/ansible/plugins/lookup/__pycache__/config.cpython-311.pyc
�

���c����ddlmZmZmZeZdZdZdZddl	m
cmZddl
mZddlmZmZmZddlmZdd	lmZdd
lmZddlmZGd�d
e��Zd�Zd�ZGd�de��ZdS)�)�absolute_import�division�print_functiona�
    name: config
    author: Ansible Core Team
    version_added: "2.5"
    short_description: Lookup current Ansible configuration values
    description:
      - Retrieves the value of an Ansible configuration setting.
      - You can use C(ansible-config list) to see all available settings.
    options:
      _terms:
        description: The key(s) to look up
        required: True
      on_missing:
        description:
            - action to take if term is missing from config
            - Error will raise a fatal error
            - Skip will just ignore the term
            - Warn will skip over it but issue a warning
        default: error
        type: string
        choices: ['error', 'skip', 'warn']
      plugin_type:
        description: the type of the plugin referenced by 'plugin_name' option.
        choices: ['become', 'cache', 'callback', 'cliconf', 'connection', 'httpapi', 'inventory', 'lookup', 'netconf', 'shell', 'vars']
        type: string
        version_added: '2.12'
      plugin_name:
        description: name of the plugin for which you want to retrieve configuration settings.
        type: string
        version_added: '2.12'
a

    - name: Show configured default become user
      ansible.builtin.debug: msg="{{ lookup('ansible.builtin.config', 'DEFAULT_BECOME_USER')}}"

    - name: print out role paths
      ansible.builtin.debug:
        msg: "These are the configured role paths: {{lookup('ansible.builtin.config', 'DEFAULT_ROLES_PATH')}}"

    - name: find retry files, skip if missing that key
      ansible.builtin.find:
        paths: "{{lookup('ansible.builtin.config', 'RETRY_FILES_SAVE_PATH')|default(playbook_dir, True)}}"
        patterns: "*.retry"

    - name: see the colors
      ansible.builtin.debug: msg="{{item}}"
      loop: "{{lookup('ansible.builtin.config', 'COLOR_OK', 'COLOR_CHANGED', 'COLOR_SKIP', wantlist=True)}}"

    - name: skip if bad value in var
      ansible.builtin.debug: msg="{{ lookup('ansible.builtin.config', config_in_var, on_missing='skip')}}"
      var:
        config_in_var: UNKNOWN

    - name: show remote user and port for ssh connection
      ansible.builtin.debug: msg={{q("ansible.builtin.config", "remote_user", "port", plugin_type="connection", plugin_name="ssh", on_missing='skip')}}

    - name: show remote_tmp setting for shell (sh) plugin
      ansible.builtin.debug: msg={{q("ansible.builtin.config", "remote_tmp", plugin_type="shell", plugin_name="sh")}}
zM
_raw:
  description:
    - value(s) of the key(s) in the config
  type: raw
N)�	constants)�AnsibleError�AnsibleLookupError�AnsibleOptionsError)�	to_native)�string_types)�
LookupBase)�Sentinelc��eZdZdS)�MissingSettingN)�__name__�
__module__�__qualname__���B/usr/lib/python3.11/site-packages/ansible/plugins/lookup/config.pyrrTs�������Drrc�l�	ttd|z��}|�|d���}|�td|�d|�d����tj�|||j|���}nB#t$r�t$r+}t|��}d|vrt||�	���|�d}~wwxYw|S)
Nz	%s_loaderT)�
class_onlyzUnable to load z	 plugin "�")�plugin_type�plugin_name�	variableszwas not defined��orig_exc)�getattr�
plugin_loader�getr�C�config�get_config_value�
_load_namerr
r)	�pname�ptyper"r�loader�p�result�e�msgs	         r�_get_plugin_configr,Xs���
����e�(;�<�<���J�J�u��J�.�.���9�$�$����u�u�u�%U�V�V�V���*�*�6�u�RS�R^�js�*�t�t��������
�������l�l����#�#� ��q�1�1�1�1�������	�����Ms�A/A2�2B1�&B,�,B1c���	tt|��}t|��rtd|z���n0#t$r#}tt
|��|����d}~wwxYw|S)NzInvalid setting "%s" attemptedr)rr!�callabler�AttributeErrorrr
)r"r)r*s   r�_get_global_configr0ks���7���F�#�#���F���	P�$�%E��%N�O�O�O�	P���7�7�7��Y�q�\�\�A�6�6�6�6�����7�����Ms�69�
A&�A!�!A&c��eZdZdd�ZdS)�LookupModuleNc	��|�||���|�d��}|�d��}|�d��}|s|r|r|std���t|t��r|dvrtd|z���g}|D]�}t|t��s"td|�d	t|�������t}		|rt||||��}	nt|��}	n\#t$rO}
|d
krtd|z|
����|d
kr|j�d|z��n|dkr	Yd}
~
nd}
~
wwxYw|	tur|�
|	����|S)N)�var_options�direct�
on_missingrrzOBoth plugin_type and plugin_name are required, cannot use one without the other)�error�warn�skipzJ"on_missing" must be a string and one of "error", "warn" or "skip", not %szInvalid setting identifier, "z" is not a string, its a r7zUnable to find setting %srr8z!Skipping, did not find setting %sr9)�set_options�
get_optionr	�
isinstancer�typer
r,r0rr�_display�warning�append)�self�termsr�kwargs�missingr&r%�ret�termr)r*s           r�runzLookupModule.runxs������Y�v��>�>�>��/�/�,�/�/�����
�.�.�����
�.�.���	y�U�	y�U�	y�u�	y�%�&w�x�x�x��'�<�0�0�	~�G�C\�4\�4\�%�&r�u|�&|�}�}�}����	#�	#�D��d�L�1�1�
}�)�)�jn�jn�jn�pt�uy�pz�pz�pz�*{�|�|�|��F�
��6�/��u�d�I�N�N�F�F�/��5�5�F���!�
�
�
��g�%�%�,�-H�4�-O�Z[�\�\�\�\���&�&��M�)�)�*M�PT�*T�U�U�U�U���&�&�����������

�����X�%�%��
�
�6�"�"�"���
s�$D�
E�
AE�E)N)rrrrGrrrr2r2vs(������$�$�$�$�$�$rr2) �
__future__rrrr=�
__metaclass__�
DOCUMENTATION�EXAMPLES�RETURN�ansible.plugins.loader�pluginsr'r�ansiblerr!�ansible.errorsrrr	�ansible.module_utils._textr
�ansible.module_utils.sixr�ansible.plugins.lookupr�ansible.utils.sentinelr
rr,r0r2rrr�<module>rUsS��C�B�B�B�B�B�B�B�B�B��
��
�@��:
��/�.�.�.�.�.�.�.�.�"�"�"�"�"�"�P�P�P�P�P�P�P�P�P�P�0�0�0�0�0�0�1�1�1�1�1�1�-�-�-�-�-�-�+�+�+�+�+�+�	�	�	�	�	�(�	�	�	����&���&�&�&�&�&�:�&�&�&�&�&r

Youez - 2016 - github.com/yon3zu
LinuXploit