summaryrefslogtreecommitdiff
path: root/lib/chef/knife
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Validate name argument for knife list"Tim Smith2019-11-121-7/+2
| | | | This reverts commit c29b8da2b0353bb5d6e499b5d7cc79c0fadab9b3.
* Validate name argument for knife listVivek Singh2019-11-051-2/+7
| | | | | | |  - Add required specs.  - Raise an error if no argument provided. Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* Updates for Chefstyle with Rubocop 0.75.1Tim Smith2019-11-042-2/+2
| | | | | | This update found a few things that should have been triggering before. Signed-off-by: Tim Smith <tsmith@chef.io>
* Fix TypeError: no implicit conversion of nil into StringVivek Singh2019-11-031-1/+2
| | | | | |  - Now showing relevant logs for config.d configuration files. Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* Fix knife cookbook metadata from file name argsVivek Singh2019-10-291-0/+6
| | | | Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* Merge pull request #9028 from MsysTechnologiesllc/VSingh/fix-knife-ssh-name-argsTim Smith2019-10-271-0/+6
|\ | | | | Fix Exception: NoMethodError: undefined method join for nil:NilClass
| * Fix Exception: NoMethodError: undefined method join for nil:NilClassVivek Singh2019-10-271-0/+6
| | | | | | | | Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* | Fix node show non-existent attributesVivek Singh2019-10-271-1/+1
|/ | | | Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* Merge pull request #8909 from ↵Tim Smith2019-10-151-4/+11
|\ | | | | | | | | MsysTechnologiesllc/VSingh/remove-secret-short-option [knife] Deprecate data bag secret (-s) short option due to conflict with --server-url option
| * Add deprecation warning if secret option -s is passedVivek Singh2019-10-061-3/+11
| | | | | | | | Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
| * Remove data bag secret (-s) short optionVivek Singh2019-09-191-2/+1
| | | | | | | | Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* | Fix typo for knife download --[no]-diff and force options.Vasu11052019-10-151-2/+2
| | | | | | | | Signed-off-by: Vasu1105 <vasundhara.jagdale@msystechnologies.com>
* | Merge pull request #8971 from ↵Tim Smith2019-10-142-9/+22
|\ \ | | | | | | | | | | | | MsysTechnologiesllc/VSingh/MSYS-1122_knife_supermarket_list_enhancement Enhance knife supermarket list & search
| * | Increase items count to avoid paginationVivek Singh2019-10-152-2/+4
| | | | | | | | | | | | Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
| * | Update get_cookbook_list query paramsVivek Singh2019-10-091-11/+7
| | | | | | | | | | | | Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
| * | Enhance knife supermarket list & searchVivek Singh2019-10-092-10/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | |  - Increase items count 10 to 1000.    - Remove #sort from cookbook collection because data is already sorted.  - Add --sort-by & --owned-by options  - Update new_start count if total records is less so that it can prevent infinite loop. Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* | | Merge pull request #8895 from ↵Tim Smith2019-10-141-6/+6
|\ \ \ | | | | | | | | | | | | | | | | MsysTechnologiesllc/Nimesh/MSYS-1098_handle_race_condition Using umask to avoid race conditions in bootstrap
| * | | Using umask to avoid race conditionsNimesh-Msys2019-10-091-6/+6
| |/ / | | | | | | | | | Signed-off-by: Nimesh-Msys <nimesh.patni@msystechnologies.com>
* | | Fix undefined method `each' for StringVivek Singh2019-10-141-1/+9
|/ / | | | | | | | | | | - Better UI when no args provided for knife exec. Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* | Merge pull request #8856 from MsysTechnologiesllc/bootstrap_password_promptTim Smith2019-10-081-4/+28
|\ \ | | | | | | Fix Bootstrap password prompt
| * | Fix password prompt in the bootstrap command.Amol Shinde2019-09-111-4/+28
| | | | | | | | | | | | | | | | | | - Fix test-case for password prompt. Signed-off-by: Amol Shinde <amol.shinde@msystechnologies.com>
* | | Merge pull request #8885 from ↵Tim Smith2019-10-011-2/+1
|\ \ \ | | | | | | | | | | | | | | | | MsysTechnologiesllc/Nimesh/MSYS-1095_remove_validation_key Removing sh -c wrapper around the bootstrapper command string
| * | | Removing sh -c ' ' wrapper from bootstrap templateNimesh-Msys2019-09-261-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - It avoids security leakage - Also allows handling single quotes Signed-off-by: Nimesh-Msys <nimesh.patni@msystechnologies.com>
* | | | Fix some places where constants from dist.rb were not used. Specifically for ↵Tensibai2019-09-261-1/+1
|/ / / | | | | | | | | | | | | | | | chef-shell Signed-off-by: Tensibai <tensibai@iabis.net>
* | | Fix knife ssh interactive mode exit errorVivek Singh2019-09-251-1/+1
| |/ |/| | | | | Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* | Fix typo when checking for existing chef-clientWill Fisher2019-09-111-1/+1
| | | | | | | | | | | | | | The knife bootstrap is always installing chef-client due to a typo in the test that checks for the existance of the executable. Signed-off-by: Will Fisher <wfisher@chef.io>
* | Merge pull request #8816 from ↵Tim Smith2019-09-091-1/+8
|\ \ | | | | | | | | | | | | MsysTechnologiesllc/VSingh/MSYS-1063-retry-with-pty-true Bootstrap: Set pty true only if required
| * | Replace exception text check with reason symbolVivek Singh2019-08-291-1/+1
| | | | | | | | | | | | Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
| * | Fix chefstyleVivek Singh2019-08-211-11/+9
| | | | | | | | | | | | Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
| * | Remove retry_require boolean & check on pty keyVivek Singh2019-08-211-3/+1
| | | | | | | | | | | | Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
| * | Bootstrap: Set pty true only if requiredVivek Singh2019-08-141-3/+14
| |/ | | | | | | | | | | | | - rescue the exception and retry with pty: true if host configured with `requiretty`. - Remove the default pty: true for all node that causes the error in the window and other hosts while detecting the system. Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* | Change ownership --sudo option is passed.Vivek Singh2019-08-301-3/+2
| | | | | | | | | | | | | | | | - If --sudo is passed then command run as root user instead of the logged-in user. - It will create Dir with root user privilege. - In order to fix this need to change the dir ownership back to the logged-in user. Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* | Change ownership only for non-sudo userVivek Singh2019-08-291-2/+1
| | | | | | | | Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* | Fix always require sudo to change ownershipVivek Singh2019-08-141-1/+3
|/ | | | | | | - Add check to append sudo only if require sudo privilege. - Work fine with Ubuntu, CentOS, AIX nodes. Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* Updated knife cookbook metadata from file command bannerAmol Shinde2019-08-131-1/+1
| | | | | | - Added file in banner Signed-off-by: Amol Shinde <amol.shinde@msystechnologies.com>
* Merge pull request #8795 from ↵Tim Smith2019-08-071-16/+19
|\ | | | | | | | | MsysTechnologiesllc/VSingh/temp-dir-using-mkdir-instead-of-mktemp Chef-15: Make temp dir using mkdir instead of mktemp
| * Fix chown: Operation not permittedVivek Singh2019-08-071-1/+1
| | | | | | | | | | | | - Added sudo chown to fix permission denied error. Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
| * Make temp dir using mkdir instead of mktempVivek Singh2019-08-061-16/+19
| | | | | | | | | | | | - mktemp does not exist for AIX system. Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* | fix to avoid conflicts with pattern of other datadheerajd-msys2019-08-062-4/+3
| | | | | | | | Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
* | preserve earlier output pattern with correct fixdheerajd-msys2019-08-062-3/+3
| | | | | | | | Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
* | fix knife node environment setdheerajd-msys2019-08-061-1/+1
|/ | | | Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
* Style/SymbolProcLamont Granquist2019-07-0513-25/+25
| | | | | | enforce pretzels. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/StringLiteralsInInterpolationLamont Granquist2019-07-0514-40/+40
| | | | | | since we use double quotes, be consistent everywhere. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/ClassCheckLamont Granquist2019-07-054-8/+8
| | | | | | convert kind_of? to is_a? Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/RegexpLiteralLamont Granquist2019-07-051-1/+1
| | | | | | | given how many regexps we have with /'s in the match this seems like a very good one. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/NegatedIfLamont Granquist2019-07-057-12/+12
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/EmptyLiteralLamont Granquist2019-07-059-14/+14
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/EmptyMethodLamont Granquist2019-07-022-8/+4
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/MethodCallWithoutArgsParenthesesLamont Granquist2019-07-022-2/+2
| | | | | | | | zero args methods don't get parens. this certainly reads better than the inverse. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/SymbolArrayLamont Granquist2019-07-022-2/+2
| | | | | | start enforcing using %i{} instead of arrays of symbols Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>