Skip to content

Commit

Permalink
Merge pull request #42 from sorah/no-access-key-option
Browse files Browse the repository at this point in the history
Add --no-access-key option
  • Loading branch information
winebarrel authored Sep 24, 2018
2 parents 2123822 + 56a2274 commit cb9d8f4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions bin/miam
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ ARGV.options do |opt|
opt.on('' , '--target REGEXP') {|v| (options[:target] ||= []) << Regexp.new(v) }
opt.on('' , '--exclude REGEXP') {|v| (options[:exclude] ||= []) << Regexp.new(v) }
opt.on('' , '--ignore-login-profile') { options[:ignore_login_profile] = true }
opt.on('' , '--no-access-key') { options[:no_access_key] = true }
opt.on('' , '--no-color') { options[:color] = false }
opt.on('' , '--no-progress') { options[:no_progress] = true }
opt.on('' , '--debug') { options[:debug] = true }
Expand Down
2 changes: 1 addition & 1 deletion lib/miam/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def walk_users(expected, actual, group_users)
updated = walk_user(user_name, expected_attrs, actual_attrs) || updated
else
actual_attrs = @driver.create_user(user_name, expected_attrs)
access_key = @driver.create_access_key(user_name)
access_key = @driver.create_access_key(user_name) unless @options[:no_access_key]

if access_key
@password_manager.puts_password(user_name, access_key[:access_key_id], access_key[:secret_access_key])
Expand Down

0 comments on commit cb9d8f4

Please sign in to comment.