module R10K::Action::Deploy::DeployHelpers
Public Instance Methods
check_write_lock!(config)
click to toggle source
Check to see if the deploy write_lock setting has been set, and log the lock message and exit if it has been set.
@param config [Hash] The r10k config hash
@raise [SystemExit] if the deploy write_lock setting has been set
# File lib/r10k/action/deploy/deploy_helpers.rb, line 23 def check_write_lock!(config) write_lock = config.fetch(:deploy, {})[:write_lock] if write_lock logger.fatal("Making changes to deployed environments has been administratively disabled.") logger.fatal("Reason: #{write_lock}") exit(16) end end
expect_config!()
click to toggle source
Ensure that a config file has been found (and presumably loaded) and exit with a helpful error if it hasn't.
@raise [SystemExit] If no config file was loaded
# File lib/r10k/action/deploy/deploy_helpers.rb, line 10 def expect_config! if @config.nil? logger.fatal("No configuration file given, no config file found in current directory, and no global config present") exit(8) end end