%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3.9/site-packages/ansible/plugins/vars/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3.9/site-packages/ansible/plugins/vars/__pycache__/host_group_vars.cpython-39.pyc

a

�)gt�@s�ddlmZmZmZeZdZddlZddlm	Z
ddlmZddl
mZmZmZddlmZddlmZdd	lmZdd
lmZiZGdd�de�ZdS)
�)�absolute_import�division�print_functionaV
    name: host_group_vars
    version_added: "2.4"
    short_description: In charge of loading group_vars and host_vars
    requirements:
        - Enabled in configuration
    description:
        - Loads YAML vars into corresponding groups/hosts in group_vars/ and host_vars/ directories.
        - Files are restricted by extension to one of .yaml, .json, .yml or no extension.
        - Hidden (starting with '.') and backup (ending with '~') files and directories are ignored.
        - Only applies to inventory sources that are existing paths.
        - Starting in 2.10, this plugin requires enabling and is enabled by default.
    options:
      stage:
        ini:
          - key: stage
            section: vars_host_group_vars
        env:
          - name: ANSIBLE_VARS_PLUGIN_STAGE
      _valid_extensions:
        default: [".yml", ".yaml", ".json"]
        description:
          - "Check all of these extensions when looking for 'variable' files which should be YAML or JSON or vaulted versions of these."
          - 'This affects vars_files, include_vars, inventory and vars plugins among others.'
        env:
          - name: ANSIBLE_YAML_FILENAME_EXT
        ini:
          - key: yaml_valid_extensions
            section: defaults
        type: list
        elements: string
    extends_documentation_fragment:
      - vars_plugin_staging
N)�	constants)�AnsibleParserError)�to_bytes�	to_native�to_text)�BaseVarsPlugin)�Host)�Group)�combine_varscs"eZdZdZd�fdd�	Z�ZS)�
VarsModuleTcs�t|t�s|g}tt|��|||�i}|D�]L}t|t�rBd}n t|t�rRd}ntdt|���|j	�
tjj
�s,z�g}tj�ttj�|j|���}	t|	�}
d|j	|
f}|r�|tvr�t|}nXtj�|	��rtj�|	��r|j�d|
�|�|
|j	�}|t|<n|j�d||
f�|D]&}|j|ddd�}
|
�rt||
�}�qWq,t�yx}ztt|���WYd	}~q,d	}~00q,|S)
z parses the inventory file Z	host_varsZ
group_varsz5Supplied entity must be Host or Group, got %s insteadz%s.%sz	processing dir %sz.Found %s that is not a directory, skipping: %sT)�cacheZunsafeN)�
isinstance�list�superr�get_varsrrr�type�name�
startswith�os�path�sep�realpathr�joinZ_basedirr	�FOUND�exists�isdirZ_display�debugZfind_vars_filesZwarningZload_from_filer
�	Exceptionr)�self�loaderrZentitiesr�dataZentityZsubdirZfound_filesZb_opathZopath�key�foundZnew_data�e��	__class__��H/usr/lib/python3.9/site-packages/ansible/plugins/vars/host_group_vars.pyrHs>





$zVarsModule.get_vars)T)�__name__�
__module__�__qualname__ZREQUIRES_ENABLEDr�
__classcell__r)r)r'r*rDsr)Z
__future__rrrrZ
__metaclass__Z
DOCUMENTATIONrZansibler�CZansible.errorsrZansible.module_utils._textrrr	Zansible.plugins.varsr
Zansible.inventory.hostrZansible.inventory.grouprZansible.utils.varsr
rrr)r)r)r*�<module>s#

Zerion Mini Shell 1.0