%PDF- %PDF-
Mini Shell

Mini Shell

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

a

�)g��@s\ddlmZmZmZeZdZdZdZddl	m
Z
ddlmZddl
mZGdd	�d	e�Zd
S)�)�absolute_import�division�print_functiona	
    name: inventory_hostnames
    author:
      - Michael DeHaan
      - Steven Dossett (!UNKNOWN) <sdossett@panath.com>
    version_added: "1.3"
    short_description: list of inventory hosts matching a host pattern
    description:
      - "This lookup understands 'host patterns' as used by the C(hosts:) keyword in plays
        and can return a list of matching hosts from inventory"
    notes:
      - this is only worth for 'hostname patterns' it is easier to loop over the group/group_names variables otherwise.
z�
- name: show all the hosts matching the pattern, i.e. all but the group www
  ansible.builtin.debug:
    msg: "{{ item }}"
  with_inventory_hostnames:
    - all:!www
zk
 _hostnames:
    description: list of hostnames that matched the host pattern in inventory
    type: list
)�AnsibleError)�InventoryManager)�
LookupBasec@seZdZddd�ZdS)�LookupModuleNcKszt|jdd�}|d��D]*\}}|�|�|D]}|j||d�q0qzdd�|j|d�D�WStytgYS0dS)NF)�parse�groups)�groupcSsg|]
}|j�qS�)�name)�.0�hrr�N/usr/lib/python3.9/site-packages/ansible/plugins/lookup/inventory_hostnames.py�
<listcomp>3�z$LookupModule.run.<locals>.<listcomp>)�pattern)rZ_loader�items�	add_groupZadd_hostZ	get_hostsr)�selfZtermsZ	variables�kwargsZmanagerr�hosts�hostrrr�run+s
zLookupModule.run)N)�__name__�
__module__�__qualname__rrrrrr*srN)Z
__future__rrr�typeZ
__metaclass__Z
DOCUMENTATIONZEXAMPLESZRETURNZansible.errorsrZansible.inventory.managerrZansible.plugins.lookuprrrrrr�<module>s

Zerion Mini Shell 1.0