mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
More explanation in docstring
This commit is contained in:
parent
0586cb1536
commit
8b9f707c21
1 changed files with 9 additions and 0 deletions
|
@ -31,6 +31,7 @@ options:
|
|||
version_added: "2.7"
|
||||
description:
|
||||
- "The customized message used for a failing assertion"
|
||||
- "This argument was called 'msg' before version 2.7, now it's renamed to 'fail_msg' with alias 'msg'"
|
||||
aliases:
|
||||
- msg
|
||||
success_msg:
|
||||
|
@ -52,10 +53,18 @@ EXAMPLES = '''
|
|||
- "'foo' in some_command_result.stdout"
|
||||
- "number_of_the_counting == 3"
|
||||
|
||||
# after version 2.7 both 'msg' and 'fail_msg' can customize failing assertion message
|
||||
- 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"
|
||||
|
||||
# please use 'msg' when ansible version is smaller than 2.7
|
||||
- assert:
|
||||
that:
|
||||
- "my_param <= 100"
|
||||
- "my_param >= 0"
|
||||
msg: "'my_param' must be between 0 and 100"
|
||||
'''
|
||||
|
|
Loading…
Reference in a new issue