%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__/assert.cpython-39.pyc

a

�)g�@shddlmZmZmZeZddlmZddlm	Z	ddl
mZddlm
Z
ddlmZGdd�de�Zd	S)
�)�absolute_import�division�print_function)�AnsibleError)�Conditional)�
ActionBase)�string_types)�booleancs.eZdZdZdZed�Zd�fdd�	Z�ZS)�ActionModulez Fail with custom message F)�fail_msg�msg�quiet�success_msg�thatNcs|durt�}tt|��||�}~d|jjvr6td��d}d}|jj�d|jj�d��}|durfd}nDt|t	�r�t
dd�|D��s�td��nt|tt	f�s�td	t|���|jj�d
�}|dur�d}nFt|t	�r�t
dd�|D��s�td
��n t|tt	f��stdt|���t
|jj�dd�dd�}z|jjd}Wn t�yT|jjd}Yn0t|t��rn|j�|�}t|t	��s�|g}t|jd�}|�s�d|d<|D]L}	|	g|_|j|j|d�}
|
�s�d|d<|
|d<|	|d<||d<|S�q�d|d<||d<|S)Nrz%conditional required in "that" stringrrzAssertion failedcss|]}t|t�VqdS�N��
isinstancer��.0�x�r�A/usr/lib/python3.9/site-packages/ansible/plugins/action/assert.py�	<genexpr>2�z#ActionModule.run.<locals>.<genexpr>zFType of one of the elements in fail_msg or msg list is not string typezHIncorrect type for fail_msg or msg, expected a string or list and got %srzAll assertions passedcss|]}t|t�VqdSrrrrrrr;rzBType of one of the elements in success_msg list is not string typezDIncorrect type for success_msg, expected a string or list and got %sr
F)�strict)�loaderTZ_ansible_verbose_always)ZtemplarZall_varsZfailedZevaluated_toZ	assertionZchanged)�dict�superr
�runZ_task�argsr�getr�list�allr�typer	Zuntemplated_args�KeyError�strZ_templar�templaterZ_loaderZwhenZevaluate_conditional)�self�tmpZ	task_vars�resultrrr
ZthatsZcondrZtest_result��	__class__rrr!s`



zActionModule.run)NN)	�__name__�
__module__�__qualname__�__doc__ZTRANSFERS_FILES�	frozensetZ_VALID_ARGSr�
__classcell__rrr*rr
sr
N)Z
__future__rrrr#Z
__metaclass__Zansible.errorsrZansible.playbook.conditionalrZansible.plugins.actionrZansible.module_utils.sixrZ)ansible.module_utils.parsing.convert_boolr	r
rrrr�<module>s

Zerion Mini Shell 1.0