%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3.9/site-packages/ansible/plugins/action/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3.9/site-packages/ansible/plugins/action/__pycache__/add_host.cpython-39.opt-1.pyc

a

�)gS�@s�ddlmZmZmZeZddlmZddlm	Z	ddl
mZddlm
Z
ddlmZddlmZddlmZe�ZGd	d
�d
e
�ZdS)�)�absolute_import�division�print_function)�Mapping)�AnsibleActionFail)�string_types)�
ActionBase)�
parse_address)�Display)�combine_varscs*eZdZdZdZdZd�fdd�	Z�ZS)�ActionModulez: Create inventory hosts and groups in the memory inventoryTFNc
s�d|_tt|��||�}~|jj}|�di�}t|t�rDt	||�}nt
dt|���|�d|�d|�dd���}|dur�t
d��t
�d|�zt|d	d
�\}}Wnty�|}d}Yn0|r�||d<|�d|�d
|�dd���}	g}
|	�rLt|	t��r|	}n&t|	t��r|	�d�}nt
d|jd��|D]}||
v�r,|
�|����q,t�}
td�}|��D]}||v�rb|||
|<�qbd	|d<t||
|
d�|d<|S)NTZ_raw_paramszEInvalid raw parameters passed, requires a dictonary/mapping got a  %s�name�hostname�hostz+name, host or hostname needs to be providedz)creating host via 'add_host': hostname=%sF)Zallow_rangesZansible_ssh_port�	groupname�groups�group��,z#Groups must be specified as a list.)�obj)r
rrrZchanged)Z	host_namer�	host_varsZadd_host)Z_supports_check_mode�superr�runZ_task�args�pop�
isinstancerrr�type�get�displayZvvr	�	Exception�listr�split�append�strip�dict�	frozenset�keys)�self�tmpZ	task_vars�resultr�raw�new_namer
�portrZ
new_groupsZ
group_listZ
group_namerZspecial_args�k��	__class__��C/usr/lib/python3.9/site-packages/ansible/plugins/action/add_host.pyr*sL



zActionModule.run)NN)�__name__�
__module__�__qualname__�__doc__ZBYPASS_HOST_LOOPZTRANSFERS_FILESr�
__classcell__r0r0r.r1r#srN)Z
__future__rrrrZ
__metaclass__�collections.abcrZansible.errorsrZansible.module_utils.sixrZansible.plugins.actionrZansible.parsing.utils.addressesr	Zansible.utils.displayr
Zansible.utils.varsrrrr0r0r0r1�<module>s

Zerion Mini Shell 1.0