+

Search Tips   |   Advanced Search

ansible.builtin.assert - Asserts given expressions are true

This module is part of ansible-base and included in all Ansible installations. In most cases, you can use the short module name assert even without specifying the collections: keyword. Despite that, we recommend you use the FQCN for easy linking to the module documentation and to avoid conflicting with other collections that may have the same module name.

New in version 1.5: of ansible.builtin


Synopsis

This module has a corresponding action plugin.


Parameters

Parameter Choices/Defaults Comments

fail_msg

string

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'.


aliases: msg

quiet

boolean

  • no ←
  • yes

Set this to yes to avoid verbose output.

success_msg

string

The customized message used for a successful assertion.

that

list / elements=string / required

A list of string expressions of the same form that can be passed to the 'when' statement.



Notes


See Also


See also

ansible.builtin.debug

The official documentation on the ansible.builtin.debug module.

ansible.builtin.fail

The official documentation on the ansible.builtin.fail module.

ansible.builtin.meta

The official documentation on the ansible.builtin.meta module.


Examples


Authors