HEX
Server: LiteSpeed
System: Linux kapuas.iixcp.rumahweb.net 5.14.0-427.42.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 1 14:58:02 EDT 2024 x86_64
User: mirz4654 (1666)
PHP: 8.1.33
Disabled: system,exec,escapeshellarg,escapeshellcmd,passthru,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,popen,pclose,dl,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setsid,posix_setuid,posix_setpgid,ini_alter,show_source,define_syslog_variables,symlink,syslog,openlog,openlog,closelog,ocinumcols,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dll,ftp,myshellexec,socket_bind,mail,posix_getwpuid
Upload Files
File: //usr/lib/python3.9/site-packages/ansible/modules/__pycache__/assert.cpython-39.pyc
a

�)g�@s$ddlmZmZmZeZdZdZdS)�)�absolute_import�division�print_functiona�
---
module: assert
short_description: Asserts given expressions are true
description:
     - This module asserts that given expressions are true with an optional custom message.
     - This module is also supported for Windows targets.
version_added: "1.5"
options:
  that:
    description:
      - A list of string expressions of the same form that can be passed to the 'when' statement.
    type: list
    elements: str
    required: true
  fail_msg:
    description:
      - The customized message used for a failing assertion.
      - This argument was called 'msg' before Ansible 2.7, now it is renamed to 'fail_msg' with alias 'msg'.
    type: str
    aliases: [ msg ]
    version_added: "2.7"
  success_msg:
    description:
      - The customized message used for a successful assertion.
    type: str
    version_added: "2.7"
  quiet:
    description:
      - Set this to C(true) to avoid verbose output.
    type: bool
    default: no
    version_added: "2.8"
extends_documentation_fragment:
  - action_common_attributes
  - action_common_attributes.conn
  - action_common_attributes.flow
attributes:
    action:
        support: full
    async:
        support: none
    become:
        support: none
    bypass_host_loop:
        support: none
    connection:
        support: none
    check_mode:
        support: full
    delegation:
        support: none
        details: Aside from C(register) and/or in combination with C(delegate_facts), it has little effect.
    diff_mode:
        support: none
    platform:
        platforms: all
seealso:
- module: ansible.builtin.debug
- module: ansible.builtin.fail
- module: ansible.builtin.meta
author:
    - Ansible Core Team
    - Michael DeHaan
a%
- ansible.builtin.assert: { that: "ansible_os_family != 'RedHat'" }

- ansible.builtin.assert:
    that:
      - "'foo' in some_command_result.stdout"
      - number_of_the_counting == 3

- name: After version 2.7 both 'msg' and 'fail_msg' can customize failing assertion message
  ansible.builtin.assert:
    that:
      - my_param <= 100
      - my_param >= 0
    fail_msg: "'my_param' must be between 0 and 100"
    success_msg: "'my_param' is between 0 and 100"

- name: Please use 'msg' when ansible version is smaller than 2.7
  ansible.builtin.assert:
    that:
      - my_param <= 100
      - my_param >= 0
    msg: "'my_param' must be between 0 and 100"

- name: Use quiet to avoid verbose output
  ansible.builtin.assert:
    that:
      - my_param <= 100
      - my_param >= 0
    quiet: true
N)Z
__future__rrr�typeZ
__metaclass__Z
DOCUMENTATIONZEXAMPLES�rr�:/usr/lib/python3.9/site-packages/ansible/modules/assert.py�<module>sB