Method: QB::Ansible::Module#warn

Defined in:
lib/qb/ansible/module.rb

#warn(msg) ⇒ nil

TODO:

Should be incorporated into #logger? Seems like it would need one of:

  1. on_... hooks, like Logger#on_warn, etc.

    This might be nice but I'd rather hold off on throwing more shit into NRSER::Log::Logger for the time being if possible.

  2. Adding a custom appender when we run a module that has a ref to the module instance and so it's Response.

Append a warning message to the #response's QB::Ansible::Module::Response#warnings array and log it.

Parameters:

  • msg (String)

    Non-empty string.

Returns:

  • (nil)


447
448
449
450
451
# File 'lib/qb/ansible/module.rb', line 447

def warn msg
  logger.warn msg
  response.warnings << msg
  nil
end