Sha256: 55f21496a3ce9ec4ef58f499da2a1abe34340a3946772d230b7aef578e024fb0
Contents?: true
Size: 1.68 KB
Versions: 15
Compression:
Stored size: 1.68 KB
Contents
# Copyright (C) 2011-2012 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' setting 'command_line', 'Command line to run', :required => true setting 'message', 'Progress message to display if any while command is running' setting 'abort_on_failure', 'Message to display when aborting configuration if command fails. ' + 'Do not abort if not set' # 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
15 entries across 15 versions & 1 rubygems