Module: OpsWorks::CLI::Subcommands::Lockdown
- Included in:
- Agent
- Defined in:
- lib/opsworks/cli/subcommands/lockdown.rb
Class Method Summary collapse
-
.included(thor) ⇒ Object
rubocop:disable MethodLength rubocop:disable CyclomaticComplexity.
Class Method Details
.included(thor) ⇒ Object
rubocop:disable MethodLength rubocop:disable CyclomaticComplexity
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/opsworks/cli/subcommands/lockdown.rb', line 9 def self.included(thor) thor.class_eval do desc 'lockdown [--stack STACK]', 'Remove all stack permissions' option :stack, type: :array def lockdown fetch_keychain_credentials unless env_credentials? stacks = parse_stacks(.merge(active: true)) stacks.each do |stack| say "Locking down #{stack.name}..." stack..each do || .update(ssh: false, sudo: false) end end end end end |