Sha256: e2709e97f0dd7b85c5384ca4f061bd053af72201091854218c7f40145d58e4b3
Contents?: true
Size: 1.71 KB
Versions: 23
Compression:
Stored size: 1.71 KB
Contents
# Copyright (C) 2011 RightScale, Inc, All Rights Reserved Worldwide. # # THIS PROGRAM IS CONFIDENTIAL AND PROPRIETARY TO RIGHTSCALE # AND CONSTITUTES A VALUABLE TRADE SECRET. Any unauthorized use, # reproduction, modification, or disclosure of this program is # strictly prohibited. Any use of this program by an authorized # licensee is strictly subject to the terms and conditions, # including confidentiality obligations, set forth in the applicable # License Agreement between RightScale.com, Inc. and # the licensee module RightConf class ExecuteConfigurator include Configurator register :execute description 'Run arbitrary shell commands' settings :command_line => 'Command line to run', :message => 'Progress message to display if any while command is running', :abort_on_failure => 'Message to display when aborting configuration if command fails. ' + 'Do not abort if not set' validate_has_settings :command_line # No way to check, return false # # === Return # false:: Always return false def check_linux false end alias :check_darwin :check_linux alias :check_windows :check_linux # Run command line # # === Return # true:: Always return true def run_linux report_check message if message args = command_line.split(' ') args += [ { :abort_on_failure => abort_on_failure } ] if abort_on_failure Command.execute(*args) report_success if message true end alias :run_darwin :run_linux # Run command line on Windows # # === Return # true:: Always return true def run_windows true # TBD end end end
Version data entries
23 entries across 23 versions & 1 rubygems