Class: Dopi::Command::Winrm::PuppetAgentRun
- Inherits:
-
Dopi::Command
- Object
- Dopi::Command
- Dopi::Command::Winrm::PuppetAgentRun
- Defined in:
- lib/dopi/command/winrm/puppet_agent_run.rb
Instance Attribute Summary
Attributes inherited from Dopi::Command
#hash, #is_verify_command, #node
Instance Method Summary collapse
- #check_run_lock ⇒ Object
-
#initialize(command_parser, step, node, is_verify_command) ⇒ PuppetAgentRun
constructor
A new instance of PuppetAgentRun.
- #puppet_run ⇒ Object
- #validate ⇒ Object
Methods included from Dopi::CommandParser::PuppetRun
#check_run_lock_wrapper, #max_rerun, #parse_output_defaults, #puppet_bin, #puppet_run_wrapper, #rerun_on_change, #rerun_on_error, #run, #validate_puppet_run, #wait_if_already_running
Methods included from Dopi::CommandParser::Output
#check_output, #error_patterns, #fail_on_warning, #lines_with_matches, #parse_output, #validate_output, #warning_patterns
Methods included from Dopi::CommandParser::Arguments
#arguments, #validate_arguments
Methods included from Dopi::CommandParser::Env
Methods included from Dopi::Connector::Winrm
#basic_auth_only, #ca_trust_path, #disable_sspi, #endpoint, #operation_timeout, #port, #ssl, #supported_credential_types, #validate_winrm, #winrm, #winrm_command, #winrm_powershell_command
Methods included from Dopi::CommandParser::Credentials
#credentials, #validate_credentials
Methods inherited from Dopi::Command
create_plugin_instance, delete_plugin_default, delete_plugin_defaults, inherited, #load_state, #merged_hash, #meta_run, #meta_valid?, plugin_defaults, set_plugin_defaults, #state_hash, wipe_plugin_defaults
Methods included from State
#delete_on_signal, #on_signal, #reset_signals, #send_signal, #signal_procs, #signals, #state, #state_add_child, #state_auto_evaluate_children, #state_auto_evaluate_children=, #state_changed, #state_children, #state_children_done?, #state_children_failed?, #state_children_partial?, #state_children_ready?, #state_children_running?, #state_children_running_noop?, #state_children_starting?, #state_done?, #state_fail, #state_failed?, #state_finish, #state_partial?, #state_ready, #state_ready?, #state_reset, #state_reset_with_children, #state_run, #state_run_noop, #state_running?, #state_running_noop?, #state_start, #state_starting?, #to_yaml_properties, #update, #update_mutex
Constructor Details
#initialize(command_parser, step, node, is_verify_command) ⇒ PuppetAgentRun
Returns a new instance of PuppetAgentRun.
17 18 19 20 |
# File 'lib/dopi/command/winrm/puppet_agent_run.rb', line 17 def initialize(command_parser, step, node, is_verify_command) command_parser.overwrite_defaults = { :plugin_timeout => 1800 } super(command_parser, step, node, is_verify_command) end |
Instance Method Details
#check_run_lock ⇒ Object
22 23 24 25 26 27 |
# File 'lib/dopi/command/winrm/puppet_agent_run.rb', line 22 def check_run_lock winrm_powershell_command <<-cmd $Statedir = #{puppet_bin} config print statedir if(-not( Test-Path "$Statedir/agent_catalog_run.lock" )) { exit 1 } cmd end |
#puppet_run ⇒ Object
29 30 31 |
# File 'lib/dopi/command/winrm/puppet_agent_run.rb', line 29 def puppet_run winrm_powershell_command("#{puppet_bin} agent --test --color false #{arguments}") end |
#validate ⇒ Object
12 13 14 15 |
# File 'lib/dopi/command/winrm/puppet_agent_run.rb', line 12 def validate validate_winrm validate_puppet_run end |