Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge knife-windows into chef #9354

Closed
wants to merge 58 commits into from
Closed

Merge knife-windows into chef #9354

wants to merge 58 commits into from

Commits on Sep 26, 2020

  1. Merge knife-windows into chef

    Ship the knife-windows plugin directly in Chef.
    
    Signed-off-by: Tim Smith <tsmith@chef.io>
    tas50 committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    11699a3 View commit details
    Browse the repository at this point in the history
  2. Fold KnifeWindowsBase into WinrmCommandSharedFunctions

    It only had a single method and that method was only still used in WinrmCommandSharedFunctions
    
    Signed-off-by: Tim Smith <tsmith@chef.io>
    tas50 committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    6736185 View commit details
    Browse the repository at this point in the history
  3. Sync over the updates made for 16.x

    Signed-off-by: Tim Smith <tsmith@chef.io>
    tas50 committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    31fae10 View commit details
    Browse the repository at this point in the history
  4. tty-prompt ui.ask changes

    Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
    Vivek Singh authored and tas50 committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    3a8c7b3 View commit details
    Browse the repository at this point in the history
  5. Update lib/chef/knife/windows_cert_generate.rb

    Signed-off-by: Tim Smith <tsmith@chef.io>
    
    Co-authored-by: pete higgins <pete@peterhiggins.org>
    tas50 and phiggins committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    258275f View commit details
    Browse the repository at this point in the history
  6. Remove unused requires

    Signed-off-by: Tim Smith <tsmith@chef.io>
    tas50 committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    6bba483 View commit details
    Browse the repository at this point in the history
  7. Password -> Passphrase

    Signed-off-by: Tim Smith <tsmith@chef.io>
    tas50 committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    5dbe622 View commit details
    Browse the repository at this point in the history
  8. Avoid nesting and use newer openssl format

    Signed-off-by: Tim Smith <tsmith@chef.io>
    tas50 committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    133a902 View commit details
    Browse the repository at this point in the history
  9. Convert the plugins to use chef-utils

    Signed-off-by: Tim Smith <tsmith@chef.io>
    tas50 committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    9a3e543 View commit details
    Browse the repository at this point in the history
  10. Update descriptions

    Signed-off-by: Tim Smith <tsmith@chef.io>
    tas50 committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    41671b8 View commit details
    Browse the repository at this point in the history
  11. Remove the deprecated interactive mode

    Signed-off-by: Tim Smith <tsmith@chef.io>
    tas50 committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    8b1d1c3 View commit details
    Browse the repository at this point in the history
  12. Fix the early exits on non-windows hosts

    Signed-off-by: Tim Smith <tsmith@chef.io>
    tas50 committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    30e7e36 View commit details
    Browse the repository at this point in the history
  13. Use our built in prompt tools to handle password input

    Signed-off-by: Tim Smith <tsmith@chef.io>
    tas50 committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    3aec7f2 View commit details
    Browse the repository at this point in the history
  14. Improve how we prompt for passwords and don't mutate config

    Signed-off-by: Tim Smith <tsmith@chef.io>
    tas50 committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    f41f626 View commit details
    Browse the repository at this point in the history
  15. Remove stdout/stderr syncing

    I think this was from the old password prompt
    
    Signed-off-by: Tim Smith <tsmith@chef.io>
    tas50 committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    ae8be50 View commit details
    Browse the repository at this point in the history
  16. Remove another stdout/stderr sync

    Signed-off-by: Tim Smith <tsmith@chef.io>
    tas50 committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    eeac46b View commit details
    Browse the repository at this point in the history
  17. Gate our requires

    Signed-off-by: Tim Smith <tsmith@chef.io>
    tas50 committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    18c516f View commit details
    Browse the repository at this point in the history
  18. Avoid setting a variable we don't need to

    Signed-off-by: Tim Smith <tsmith@chef.io>
    tas50 committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    53e4607 View commit details
    Browse the repository at this point in the history
  19. Avoiding having to convert these to ints later

    We still need to .to_i the values in the codebase since the user can enter anything, but we should set a string as the default only to turn it into an int later.
    
    Signed-off-by: Tim Smith <tsmith@chef.io>
    tas50 committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    a38cb6e View commit details
    Browse the repository at this point in the history
  20. Don't mutate the config by setting a password

    Signed-off-by: Tim Smith <tsmith@chef.io>
    tas50 committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    4ff23b4 View commit details
    Browse the repository at this point in the history
  21. Simplify the check for existing certs on disk

    One glob is all we need here.
    
    Signed-off-by: Tim Smith <tsmith@chef.io>
    tas50 committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    0856d5e View commit details
    Browse the repository at this point in the history
  22. Spelling fix

    Signed-off-by: Tim Smith <tsmith@chef.io>
    tas50 committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    ec51b88 View commit details
    Browse the repository at this point in the history
  23. Add a return for the passphrase

    Signed-off-by: Tim Smith <tsmith@chef.io>
    tas50 committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    628b324 View commit details
    Browse the repository at this point in the history
  24. Use ui.fatal! to format errors with color and exit 1

    Signed-off-by: Tim Smith <tsmith@chef.io>
    tas50 committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    c3b2dc2 View commit details
    Browse the repository at this point in the history
  25. Remove unused methods

    Signed-off-by: Tim Smith <tsmith@chef.io>
    tas50 committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    cd5dc2f View commit details
    Browse the repository at this point in the history
  26. Use in: in the knife options

    Signed-off-by: Tim Smith <tsmith@chef.io>
    tas50 committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    3105b67 View commit details
    Browse the repository at this point in the history
  27. Use in: in more options

    Signed-off-by: Tim Smith <tsmith@chef.io>
    tas50 committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    3c857db View commit details
    Browse the repository at this point in the history
  28. Fix descriptions

    Signed-off-by: Tim Smith <tsmith@chef.io>
    tas50 committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    bef8b93 View commit details
    Browse the repository at this point in the history
  29. Update lib/chef/knife/winrm.rb

    Signed-off-by: Tim Smith <tsmith@chef.io>
    
    Co-authored-by: pete higgins <pete@peterhiggins.org>
    tas50 and phiggins committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    1ea84ef View commit details
    Browse the repository at this point in the history
  30. Update lib/chef/knife/winrm_base.rb

    Signed-off-by: Tim Smith <tsmith@chef.io>
    
    Co-authored-by: pete higgins <pete@peterhiggins.org>
    tas50 and phiggins committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    56bc896 View commit details
    Browse the repository at this point in the history
  31. Update lib/chef/knife/winrm_knife_base.rb

    Signed-off-by: Tim Smith <tsmith@chef.io>
    
    Co-authored-by: pete higgins <pete@peterhiggins.org>
    tas50 and phiggins committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    54bf0e9 View commit details
    Browse the repository at this point in the history
  32. Update lib/chef/knife/winrm_knife_base.rb

    Signed-off-by: Tim Smith <tsmith@chef.io>
    
    Co-authored-by: pete higgins <pete@peterhiggins.org>
    tas50 and phiggins committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    9525fe8 View commit details
    Browse the repository at this point in the history
  33. Update lib/chef/knife/winrm_knife_base.rb

    Signed-off-by: Tim Smith <tsmith@chef.io>
    
    Co-authored-by: pete higgins <pete@peterhiggins.org>
    tas50 and phiggins committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    da24159 View commit details
    Browse the repository at this point in the history
  34. Update lib/chef/knife/winrm_knife_base.rb

    Signed-off-by: Tim Smith <tsmith@chef.io>
    
    Co-authored-by: pete higgins <pete@peterhiggins.org>
    tas50 and phiggins committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    95275a2 View commit details
    Browse the repository at this point in the history
  35. Update lib/chef/knife/winrm_knife_base.rb

    Signed-off-by: Tim Smith <tsmith@chef.io>
    
    Co-authored-by: pete higgins <pete@peterhiggins.org>
    tas50 and phiggins committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    0679244 View commit details
    Browse the repository at this point in the history
  36. Update lib/chef/knife/winrm_knife_base.rb

    Signed-off-by: Tim Smith <tsmith@chef.io>
    
    Co-authored-by: pete higgins <pete@peterhiggins.org>
    tas50 and phiggins committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    3820fee View commit details
    Browse the repository at this point in the history
  37. Remove odd require on other plugins within the winrm plugin

    Signed-off-by: Tim Smith <tsmith@chef.io>
    tas50 committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    6c63310 View commit details
    Browse the repository at this point in the history
  38. Rename confusing config check method

    '
    Signed-off-by: Tim Smith <tsmith@chef.io>
    tas50 committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    66e3a6b View commit details
    Browse the repository at this point in the history
  39. Rename more methods

    Signed-off-by: Tim Smith <tsmith@chef.io>
    tas50 committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    e773aa5 View commit details
    Browse the repository at this point in the history
  40. Nuke a method

    Signed-off-by: Tim Smith <tsmith@chef.io>
    tas50 committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    d24d1d9 View commit details
    Browse the repository at this point in the history
  41. Update lib/chef/knife/winrm_session.rb

    Signed-off-by: Tim Smith <tsmith@chef.io>
    
    Co-authored-by: pete higgins <pete@peterhiggins.org>
    tas50 and phiggins committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    e1fb23e View commit details
    Browse the repository at this point in the history
  42. Simplify code / avoid mutating config

    Signed-off-by: Tim Smith <tsmith@chef.io>
    tas50 committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    2e1ba1c View commit details
    Browse the repository at this point in the history
  43. Simplify fetching correct winrm user

    Signed-off-by: Tim Smith <tsmith@chef.io>
    tas50 committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    4a29e9a View commit details
    Browse the repository at this point in the history
  44. Rename methods to remove resolve_

    Signed-off-by: Tim Smith <tsmith@chef.io>
    tas50 committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    6f17d71 View commit details
    Browse the repository at this point in the history
  45. Update spec/unit/knife/windows_cert_install_spec.rb

    Signed-off-by: Tim Smith <tsmith@chef.io>
    
    Co-authored-by: pete higgins <pete@peterhiggins.org>
    tas50 and phiggins committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    d7ca400 View commit details
    Browse the repository at this point in the history
  46. Update spec/unit/knife/windows_cert_install_spec.rb

    Signed-off-by: Tim Smith <tsmith@chef.io>
    
    Co-authored-by: pete higgins <pete@peterhiggins.org>
    tas50 and phiggins committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    2eb7e83 View commit details
    Browse the repository at this point in the history
  47. Update lib/chef/knife/windows_cert_generate.rb

    Signed-off-by: Tim Smith <tsmith@chef.io>
    
    Co-authored-by: pete higgins <pete@peterhiggins.org>
    tas50 and phiggins committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    8ad14c3 View commit details
    Browse the repository at this point in the history
  48. Update lib/chef/knife/wsman_test.rb

    Signed-off-by: Tim Smith <tsmith@chef.io>
    
    Co-authored-by: pete higgins <pete@peterhiggins.org>
    tas50 and phiggins committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    6bb5d6f View commit details
    Browse the repository at this point in the history
  49. Update lib/chef/knife/wsman_test.rb

    Signed-off-by: Tim Smith <tsmith@chef.io>
    
    Co-authored-by: pete higgins <pete@peterhiggins.org>
    tas50 and phiggins committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    1a8d2bc View commit details
    Browse the repository at this point in the history
  50. Update lib/chef/knife/winrm_shared_options.rb

    Signed-off-by: Tim Smith <tsmith@chef.io>
    
    Co-authored-by: pete higgins <pete@peterhiggins.org>
    tas50 and phiggins committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    7550705 View commit details
    Browse the repository at this point in the history
  51. Update spec/unit/knife/windows_cert_generate_spec.rb

    Signed-off-by: Tim Smith <tsmith@chef.io>
    
    Co-authored-by: pete higgins <pete@peterhiggins.org>
    tas50 and phiggins committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    20674d7 View commit details
    Browse the repository at this point in the history
  52. Update spec/unit/knife/winrm_session_spec.rb

    Signed-off-by: Tim Smith <tsmith@chef.io>
    
    Co-authored-by: pete higgins <pete@peterhiggins.org>
    tas50 and phiggins committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    f3ae9d2 View commit details
    Browse the repository at this point in the history
  53. Update spec/unit/knife/winrm_spec.rb

    Signed-off-by: Tim Smith <tsmith@chef.io>
    
    Co-authored-by: pete higgins <pete@peterhiggins.org>
    tas50 and phiggins committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    f33f841 View commit details
    Browse the repository at this point in the history
  54. Update spec/unit/knife/wsman_test_spec.rb

    Signed-off-by: Tim Smith <tsmith@chef.io>
    
    Co-authored-by: pete higgins <pete@peterhiggins.org>
    tas50 and phiggins committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    8c6b93e View commit details
    Browse the repository at this point in the history
  55. Remove duplicate support file

    Signed-off-by: Tim Smith <tsmith@chef.io>
    tas50 committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    e75d9d9 View commit details
    Browse the repository at this point in the history
  56. Fix failing specs

    Signed-off-by: Tim Smith <tsmith@chef.io>
    tas50 committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    34d7a7c View commit details
    Browse the repository at this point in the history
  57. Fix cspell and chefstyle errors

    Signed-off-by: Tim Smith <tsmith@chef.io>
    tas50 committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    9e6a6f1 View commit details
    Browse the repository at this point in the history
  58. Chefstyle fix

    Signed-off-by: Tim Smith <tsmith@chef.io>
    tas50 committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    a4b1675 View commit details
    Browse the repository at this point in the history