Class: CemAcpt::Bolt::Cmd::TaskRun

Inherits:
TaskBase show all
Defined in:
lib/cem_acpt/bolt/cmd/task.rb

Overview

Runs the Bolt task run command

Constant Summary

Constants included from Logging

Logging::LEVEL_MAP

Instance Attribute Summary

Attributes inherited from TaskBase

#item_defaults, #sub_command, #task_name

Attributes inherited from Base

#cmd_env, #cmd_params

Instance Method Summary collapse

Methods inherited from TaskBase

#cmd, #command_family

Methods inherited from Base

#add_cmd_env, #add_cmd_param, #bolt_bin, #cmd, #command_family, #inspect, option, option_names, #options, #run, supports_params, #to_s

Methods included from Logging

current_log_config, #current_log_config, current_log_format, #current_log_format, #current_log_level, current_log_level, included, #logger, logger, new_log_config, #new_log_config, new_log_formatter, #new_log_formatter, #new_log_level, new_log_level, #new_logger, new_logger, verbose?, #verbose?

Constructor Details

#initialize(config, task_name = nil, inventory: nil, project: nil) ⇒ TaskRun

Returns a new instance of TaskRun.



51
52
53
54
55
# File 'lib/cem_acpt/bolt/cmd/task.rb', line 51

def initialize(config, task_name = nil, inventory: nil, project: nil)
  super(config, 'run', task_name)
  @inventory = inventory.is_a?(String) ? inventory : inventory&.path
  @project = project.is_a?(String) ? project : project&.path
end