Module: R10K::Action::Deploy::DeployHelpers
- Included in:
- Display, Environment, Module
- Defined in:
- lib/r10k/action/deploy/deploy_helpers.rb
Instance Method Summary collapse
-
#check_write_lock!(config) ⇒ Object
Check to see if the deploy write_lock setting has been set, and log the lock message and exit if it has been set.
-
#expect_config! ⇒ Object
Ensure that a config file has been found (and presumably loaded) and exit with a helpful error if it hasn’t.
Instance Method Details
#check_write_lock!(config) ⇒ Object
Check to see if the deploy write_lock setting has been set, and log the lock message and exit if it has been set.
23 24 25 26 27 28 29 30 |
# 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}") % {write_lock: write_lock}) exit(16) end end |
#expect_config! ⇒ Object
Ensure that a config file has been found (and presumably loaded) and exit with a helpful error if it hasn’t.
10 11 12 13 14 15 |
# 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 |