Class: Ansible::Ruby::Modules::Assert

Inherits:
Base show all
Defined in:
lib/ansible/ruby/modules/generated/utilities/logic/assert.rb

Overview

This module asserts that given expressions are true with an optional custom message. This module is also supported for Windows targets.

Instance Method Summary collapse

Methods inherited from Base

#ansible_name, #to_h

Methods inherited from Ansible::Ruby::Models::Base

attr_option, attr_options, attribute, fix_inclusion, #initialize, remove_existing_validations, #to_h, validates

Constructor Details

This class inherits a constructor from Ansible::Ruby::Models::Base

Instance Method Details

#fail_msgString?

Returns 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’.

Returns:

  • (String, nil)

    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’



17
# File 'lib/ansible/ruby/modules/generated/utilities/logic/assert.rb', line 17

attribute :fail_msg

#success_msgString?

Returns The customized message used for a successful assertion.

Returns:

  • (String, nil)

    The customized message used for a successful assertion



21
# File 'lib/ansible/ruby/modules/generated/utilities/logic/assert.rb', line 21

attribute :success_msg

#thatArray<String>, String

Returns A string expression of the same form that can be passed to the ‘when’ statement,Alternatively, a list of string expressions.

Returns:

  • (Array<String>, String)

    A string expression of the same form that can be passed to the ‘when’ statement,Alternatively, a list of string expressions



13
# File 'lib/ansible/ruby/modules/generated/utilities/logic/assert.rb', line 13

attribute :that