diff options
author | Lamont Granquist <454857+lamont-granquist@users.noreply.github.com> | 2022-03-15 12:48:29 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-15 12:48:29 -0700 |
commit | 64afc0b095a2df54d3fca8787114a23aedc82fbd (patch) | |
tree | 472a1971b744b4917770e87b8b2cbcef9c951a89 /knife/lib/chef | |
parent | d62945c3a94de662846245a3025fdcfa121e1298 (diff) | |
parent | 9081cfafc2f7fb4aa768d851bfa6bf393613556d (diff) | |
download | chef-64afc0b095a2df54d3fca8787114a23aedc82fbd.tar.gz |
Merge pull request #12619 from sanjain-progress/sanjain/2505-fix-pem-generation
Diffstat (limited to 'knife/lib/chef')
-rw-r--r-- | knife/lib/chef/knife/user_create.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/knife/lib/chef/knife/user_create.rb b/knife/lib/chef/knife/user_create.rb index 009f193d46..158e8d11cd 100644 --- a/knife/lib/chef/knife/user_create.rb +++ b/knife/lib/chef/knife/user_create.rb @@ -128,6 +128,7 @@ class Chef display_name: "#{user.first_name} #{user.last_name}", email: user.email, password: password, + create_key: user.create_key, } else user_hash = { @@ -137,6 +138,7 @@ class Chef display_name: user.display_name, email: user.email, password: password, + create_key: user.create_key, } end @@ -159,13 +161,13 @@ class Chef end ui.info("Created #{user.username}") - if final_user["private_key"] + if final_user["chef_key"] && final_user["chef_key"]["private_key"] if config[:file] File.open(config[:file], "w") do |f| - f.print(final_user["private_key"]) + f.print(final_user["chef_key"]["private_key"]) end else - ui.msg final_user["private_key"] + ui.msg final_user["chef_key"]["private_key"] end end end |