New in version 1.5.
This module asserts that a given expression is true and can be a simpler alternative to the ‘fail’ module in some cases.
parameter | required | default | choices | comments |
---|---|---|---|---|
that |
yes | A string expression of the same form that can be passed to the 'when' statement Alternatively, a list of string expressions |
- assert: { that: "ansible_os_family != 'RedHat'" } - assert: that: - "'foo' in some_command_result.stdout" - "number_of_the_counting == 3"
For more information on what this means please read Core Modules
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Helping Testing PRs and Developing Modules.