Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3.11/site-packages/ansible/plugins/lookup/__pycache__/ |
Upload File : |
� ���c& � �r � d dl mZmZmZ eZdZdZdZd dl Z d dl mZ d dlm Z d dlmZ G 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 � � e Zd Zdd�ZdS )�LookupModuleNc � � |}|rH t j |� � g}n1# t $ r$}t dt |� � z � � �d }~ww xY w|S )Nz Unable to choose random term: %s)�random�choice� Exceptionr r )�self�terms�inject�kwargs�ret�es �I/usr/lib/python3.11/site-packages/ansible/plugins/lookup/random_choice.py�runzLookupModule.run, so � ���� V� V��}�U�+�+�,����� V� V� V�"�#E� �RS���#T�U�U�U����� V���� � s � � A �A�A )N)�__name__� __module__�__qualname__r � � r r r * s( � � � � � � � � � � � r r )� __future__r r r �type� __metaclass__� DOCUMENTATION�EXAMPLES�RETURNr �ansible.errorsr �ansible.module_utils._textr �ansible.plugins.lookupr r r r r �<module>r% s� �� C� B� B� B� B� B� B� B� B� B�� � � � �� �� � � � � '� '� '� '� '� '� 0� 0� 0� 0� 0� 0� -� -� -� -� -� -�� � � � �:� � � � � r