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

a

�)g&�@sdddlmZmZmZeZdZdZdZddl	Z	ddl
mZddlm
Z
ddlmZGd	d
�d
e�ZdS)�)�absolute_import�division�print_functiona�
    name: random_choice
    author: Michael DeHaan
    version_added: "1.1"
    short_description: return random element from list
    description:
      - The 'random_choice' feature can be used to pick something at random. While it's not a load balancer (there are modules for those),
        it can somewhat be used as a poor man's load balancer in a MacGyver like situation.
      - At a more basic level, they can be used to add chaos and excitement to otherwise predictable automation environments.
z�
- name: Magic 8 ball for MUDs
  ansible.builtin.debug:
    msg: "{{ item }}"
  with_random_choice:
     - "go through the door"
     - "drink from the goblet"
     - "press the red button"
     - "do nothing"
z<
  _raw:
    description:
      - random item
    type: raw
N)�AnsibleError)�	to_native)�
LookupBasec@seZdZddd�ZdS)�LookupModuleNc
KsR|}|rNzt�|�g}Wn4tyL}ztdt|���WYd}~n
d}~00|S)Nz Unable to choose random term: %s)�random�choice�	Exceptionrr)�selfZtermsZinject�kwargs�ret�e�r�H/usr/lib/python3.9/site-packages/ansible/plugins/lookup/random_choice.py�run,s&zLookupModule.run)N)�__name__�
__module__�__qualname__rrrrrr*sr)Z
__future__rrr�typeZ
__metaclass__Z
DOCUMENTATIONZEXAMPLESZRETURNr	Zansible.errorsrZansible.module_utils._textrZansible.plugins.lookuprrrrrr�<module>s

Zerion Mini Shell 1.0