summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* restore magic resource name orderinglcg/restore-magic-resource-name-orderLamont Granquist2020-03-261-1/+4
| | | | | | | | | | | | | | | | | | | | | | this restores the order that the magic wiring of LWRP / custom resources to the cookbook_name + resource filename comes after the parsing of the file that it is defined in. i had moved this because i was running into issues with recursive calls between provides and the resource_name method, which i later solved. this restores the prior behavior, but calls provides instead of resource_name, but relies on the implicit call to resource_name from the first provides to be functionally identical to the prior behavior anyway. no idea if this actually fixes any bugs, but it was not really intentional to change it. stuff like chef_version_for_provides needs to be called before calling provides, so it seems like the behavior this fixes should have been buggy with respect to that but it is obviously... complicated. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Bump version to 16.0.160 by Chef Expeditorv16.0.160Chef Expeditor2020-03-267-19/+20
| | | | Obvious fix; these changes are the result of automation not creative thinking.
* Merge pull request #9540 from chef/client_resourcesTim Smith2020-03-254-19/+86
|\ | | | | Improve chef_client_* resources
| * Improve chef_client_* resourcesTim Smith2020-03-254-19/+86
|/ | | | | | | | | | - Add new accept_chef_license property - Wire up config_directory property in chef_client_cron to match the chef_client_scheduled_task behavior - Add run_on_battery property to chef_client_scheduled_task - Move logic into helpers in chef_client_schedule_task - Add more testing to chef_client_scheduled_task Signed-off-by: Tim Smith <tsmith@chef.io>
* Bump version to 16.0.159 by Chef Expeditorv16.0.159Chef Expeditor2020-03-257-19/+20
| | | | Obvious fix; these changes are the result of automation not creative thinking.
* Merge pull request #9508 from chef/btm/knife-yamlTim Smith2020-03-252-0/+99
|\ | | | | Add a `knife yaml convert` tool
| * Output to a file instead of stdoutbtm/knife-yamlBryan McLellan2020-03-252-20/+52
| | | | | | | | | | | | | | Refactor and direct output to a file with some magic to make up a good output filename. Signed-off-by: Bryan McLellan <btm@loftninjas.org>
| * Add a `knife yaml convert` toolBryan McLellan2020-03-251-0/+67
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Very basic interface, reads in a YAML recipe, ruby recipe goes to stdout. ``` --- resources: - type: "bash" name: "new chef user" code: " touch /tmp/jmc/something ; echo something >> /tmp/jmc/something ; rm -f /tmp/jmc/bash ; " something: - other: "dont use this" ``` gets converted to: ``` bash "new chef user" do code " touch /tmp/jmc/something ; echo something >> /tmp/jmc/something ; rm -f /tmp/jmc/bash ; " end ``` Signed-off-by: Bryan McLellan <btm@loftninjas.org>
* Merge pull request #9537 from chef/csnapp/fix_precommand_hookTim Smith2020-03-251-0/+3
|\ | | | | Modify pre-command hook to only run in verify pipeline
| * Modify pre-command hook to only run in verify pipelineChristopher A. Snapp2020-03-251-0/+3
| | | | | | | | Signed-off-by: Christopher A. Snapp <csnapp@chef.io>
* | Bump version to 16.0.158 by Chef Expeditorv16.0.158Chef Expeditor2020-03-257-19/+20
| | | | | | | | Obvious fix; these changes are the result of automation not creative thinking.
* | Merge pull request #9534 from chef/add_introducedTim Smith2020-03-251-1/+2
|\ \ | |/ |/| Add missing introduced value to the new property in rhsm_register
| * Add missing introduced value to the new property in rhsm_registeradd_introducedTim Smith2020-03-241-1/+2
|/ | | | | | I realized we needed this right after the merge Signed-off-by: Tim Smith <tsmith@chef.io>
* Bump version to 16.0.157 by Chef Expeditorv16.0.157Chef Expeditor2020-03-257-19/+20
| | | | Obvious fix; these changes are the result of automation not creative thinking.
* Merge pull request #9531 from chef/fix_windows_buildsTim Smith2020-03-241-1/+1
|\ | | | | Switch to RUBY_PLATFORM for the windows check
| * Switch to RUBY_PLATFORM for the windows checkfix_windows_buildsTim Smith2020-03-241-1/+1
| | | | | | | | | | | | Merging in this check broke the build tests on Windows hosts. Signed-off-by: Tim Smith <tsmith@chef.io>
* | Bump version to 16.0.156 by Chef Expeditorv16.0.156Chef Expeditor2020-03-247-19/+20
| | | | | | | | Obvious fix; these changes are the result of automation not creative thinking.
* | Merge pull request #9528 from chef/chef_client_windows_taskTim Smith2020-03-244-0/+253
|\ \ | | | | | | Add chef_client_windows_task resource from chef-client cookbook
| * | Add chef_client_windows_task resource from chef-client cookbookchef_client_windows_taskTim Smith2020-03-244-0/+253
| | | | | | | | | | | | | | | | | | Allow setting up chef-client to run as a scheduled task out of the box. Signed-off-by: Tim Smith <tsmith@chef.io>
* | | Bump version to 16.0.155 by Chef Expeditorv16.0.155Chef Expeditor2020-03-247-19/+20
| | | | | | | | | | | | Obvious fix; these changes are the result of automation not creative thinking.
* | | Merge pull request #9525 from ↵Tim Smith2020-03-242-1/+35
|\ \ \ | |_|/ |/| | | | | | | | jasonwbarnett/feature/add-use_https-to-rhsm_register Add : https_for_ca_consumer property to rhsm_register resource
| * | Add :https_for_ca_consumer property to rhsm_register resourceJason Barnett2020-03-242-1/+35
|/ / | | | | | | Signed-off-by: Jason Barnett <jason.w.barnett@gmail.com>
* | Bump version to 16.0.154 by Chef Expeditorv16.0.154Chef Expeditor2020-03-247-19/+20
| | | | | | | | Obvious fix; these changes are the result of automation not creative thinking.
* | Merge pull request #9527 from chef/lcg/cleanup-chef-client-cronTim Smith2020-03-242-10/+35
|\ \ | | | | | | clean up chef_client_cron
| * | clean up chef_client_cronLamont Granquist2020-03-242-10/+35
|/ / | | | | | | | | | | | | | | | | | | - add instance methods to the module so it can be mixed in - extend the module into the resource class - use explicit methods for "currying" arguments to avoid the cognitive overhead of the lambda syntax and allow using method() - use method() to keep the callbacks readable Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | Bump version to 16.0.153 by Chef Expeditorv16.0.153Chef Expeditor2020-03-247-19/+20
|/ | | | Obvious fix; these changes are the result of automation not creative thinking.
* Merge pull request #9518 from chef/chef_client_cronTim Smith2020-03-245-0/+330
|\ | | | | Add chef_client_cron resource from chef-client cookbook
| * Set append_log_file property to true by defaultchef_client_cronTim Smith2020-03-242-10/+10
| | | | | | | | | | | | This is from a convo in slack where it was determined that we can safely append due to log rotation that occurs in mixlib-log Signed-off-by: Tim Smith <tsmith@chef.io>
| * If append_log_file is set then use the -L flagTim Smith2020-03-242-3/+27
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Validate that splay values are positiveTim Smith2020-03-232-3/+14
| | | | | | | | | | | | Add some tests for this and fix the naming of other tests Signed-off-by: Tim Smith <tsmith@chef.io>
| * Use random to ensure we have a splay sleep time in rangeTim Smith2020-03-232-16/+16
| | | | | | | | | | | | The previous method was resulting in wildly out of range times. Signed-off-by: Tim Smith <tsmith@chef.io>
| * Let env vars be handled by the cron_d resourceTim Smith2020-03-231-10/+10
| | | | | | | | | | | | There's no reason to try to handle this (incorrectly) here. Signed-off-by: Tim Smith <tsmith@chef.io>
| * Add missing description for mailto propertyTim Smith2020-03-231-1/+2
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Fix some bugs in command generation and add specsTim Smith2020-03-232-3/+40
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Test the log directory creation in kitchenTim Smith2020-03-231-0/+1
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Create the log directory if it's missingTim Smith2020-03-231-1/+10
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Add cron timing validations, descriptions, and more propertiesTim Smith2020-03-231-13/+94
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Initial commit of unit testsTim Smith2020-03-231-0/+64
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Test chef_client_cron in Test KitchenTim Smith2020-03-231-0/+10
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Use the dist valuesTim Smith2020-03-232-6/+11
| | | | | | | | | | | | This is a bit odd and I could go either way with this. Should chef_client_cron setup cinc when on a cinc system? Signed-off-by: Tim Smith <tsmith@chef.io>
| * Chefstyle and add missing helperTim Smith2020-03-231-12/+20
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Add chef_client_cron resource from chef-client cookbookTim Smith2020-03-232-0/+79
|/ | | | | | | Add the chef_client_cron resource so users can manage chef-client as a cron job out of the box. Signed-off-by: Tim Smith <tsmith@chef.io>
* Bump version to 16.0.152 by Chef Expeditorv16.0.152Chef Expeditor2020-03-237-19/+20
| | | | Obvious fix; these changes are the result of automation not creative thinking.
* Merge pull request #9522 from chef/cron_validationsTim Smith2020-03-239-231/+210
|\ | | | | Move cron_d validation methods to a helper and use that in the cron resource
| * Make this a helper module not a mixincron_validationsTim Smith2020-03-234-27/+27
| | | | | | | | | | | | Stop abusing the mixin name and stop using the mixin like the kitchen drawer of junk it's becoming. Signed-off-by: Tim Smith <tsmith@chef.io>
| * Add additional specs to the cron_d resourceTim Smith2020-03-231-1/+13
| | | | | | | | | | | | Why not Signed-off-by: Tim Smith <tsmith@chef.io>
| * Fixes to the mixin tests from the reviewTim Smith2020-03-231-2/+6
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Remove a functional test that was already well cover in unit testsTim Smith2020-03-231-7/+0
| | | | | | | | | | | | This is really unit test land Signed-off-by: Tim Smith <tsmith@chef.io>
| * Chefstyle fixTim Smith2020-03-231-2/+2
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Update lib/chef/mixin/cron_validations.rb Tim Smith2020-03-231-13/+3
| | | | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io> Co-Authored-By: pete higgins <pete@peterhiggins.org>