summaryrefslogtreecommitdiff
path: root/lib/chef/provider
Commit message (Collapse)AuthorAgeFilesLines
* launchd: Fix capitalization of HardResourceLimits (#9239)Lamont Granquist2020-01-221-1/+1
|\ | | | | launchd: Fix capitalization of HardResourceLimits
| * launchd: Fix capitalization of HardResourceLimitsMarc Seeger2020-01-221-1/+1
| | | | | | | | | | | | | | Seems to have been a typo. You can check e.g. https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html or https://www.launchd.info/ for the proper capitalization. Signed-off-by: Marc Seeger <mseeger@fb.com>
* | Fix most Ruby 2.7 test failureslcg/ruby-2.7.0Lamont Granquist2020-01-211-13/+13
| | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | WIP: Chef-16 resource cleanup + unified_mode (#9174)Lamont Granquist2020-01-216-536/+4
|/ | | | | | * Chef-16 resource cleanup + unified_mode Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Merge pull request #9153 from ↵Tim Smith2020-01-162-11/+63
|\ | | | | | | | | MsysTechnologiesllc/Nimesh/MSYS-1178_cron_resource_add_timeout Add time_out property in cron resource
| * Added time_out property in cronNimesh-Msys2019-12-132-11/+63
| | | | | | | | | | | | | | | | | | | | - Property accepts hash with its options as keys and value as their values - Property also accepts Integer or String value - Minor code drapes - Maintained chefstyle - TBD for AIX platforms Signed-off-by: Nimesh-Msys <nimesh.patni@msystechnologies.com>
* | Fixed chefstylevasundhara/Fix_for_windows_task_not_idempotent_windows19_16Vasu11052020-01-161-1/+0
| | | | | | | | Signed-off-by: Vasu1105 <vasundhara.jagdale@msystechnologies.com>
* | Fix for windows task not idempotent on the windows19 and windows 16Vasu11052020-01-161-2/+3
| | | | | | | | Signed-off-by: Vasu1105 <vasundhara.jagdale@msystechnologies.com>
* | Clear password flags when setting the passwordAron List2020-01-131-1/+1
| | | | | | | | | | This will clear the password flags when the password is set for this user. This ensures that the user will not be prompted to change their password on next login. Signed-off-by: Aron List <aronotmar@live.nl>
* | Fix mac_user breakage and loggingLamont Granquist2019-12-121-22/+17
|/ | | | | | | | | | | | | | | | | | | | | | | | | | We need more defensive coding around the absense of the ShadowData. Unfortunately I wasn't able to fix the tests on my mac where this happens, and don't know how to introduce tests that would fail on buildkite, so we have no coverage for this. Testing was done manually on the CLI. Also removed some useless converge_by statements that were effectively double-logging. The methods that the converge_by's were in are already wrapped by converge_by's in the superclass so the resource is already "dirty" in the sense that it knows that it is being updated, and the log message that e.g. the user is being removed is already being printed. Some of the sub-action logging with sub-converge_by's here is still good since it shows the details of how the user is being added or removed or modified which makes sense (still sort of abusing converge_by to get only logging, but that doesn't matter because we're in a block where we MUST be updating the resource anyway). This commit also re-adds testing of unit+integration testing to the omnibus pipeline. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Add output for the file provider verification (#9039)Lamont Granquist2019-12-091-1/+4
|\ | | | | Add output for the file provider verification
| * Fix undefined method `dirname' for Chef::Provider::File:Classlcg/file-verifier-outputVivek Singh2019-12-021-1/+1
| | | | | | | | | | | | | |  - Fix failing specs.  - Fix long strings getting truncated for RSpec expectations. Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
| * add output for the file provider verificationLamont Granquist2019-12-011-1/+4
| | | | | | | | | | | | closes #4793 Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | Merge pull request #9036 from ↵Tim Smith2019-12-091-2/+1
|\ \ | | | | | | | | | | | | MsysTechnologiesllc/VSingh/fix-apt-repository-resource-uri Fix apt_repository uri single/double quotes and spaces
| * | Use URI.escape for url with spacesVivek Singh2019-12-021-2/+3
| | | | | | | | | | | | Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
| * | Fix apt_repository uri single/double quotes and spacesVivek Singh2019-12-021-4/+2
| |/ | | | | | | Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* | Resolve non-zero "success" error code issues with linux_user re… (#9105)Lamont Granquist2019-12-041-1/+6
|\ \ | | | | | | Resolve non-zero "success" error code issues with linux_user resource
| * | Removed method for defining return codes, changed to evaluate stderr on exit ↵skippy2019-11-191-15/+10
| | | | | | | | | | | | | | | | | | code 12 Signed-off-by: Jonathan Jones <gitmaster@thespooky.house>
| * | Replaced 'test' shellout with `Dir.exist?`skippy2019-11-181-4/+1
| | | | | | | | | | | | Signed-off-by: Jonathan Jones <gitmaster@thespooky.house>
| * | Resolved all chefstyle failuresskippy2019-11-171-1/+1
| | | | | | | | | | | | Signed-off-by: Jonathan Jones <gitmaster@thespooky.house>
| * | re-un-inverted my previous 3am coding adventure in double negativesskippy2019-11-171-1/+1
| | | | | | | | | | | | Signed-off-by: Jonathan Jones <gitmaster@thespooky.house>
| * | Resolved failing tests, fixed inverted logicskippy2019-11-171-4/+4
| | | | | | | | | | | | Signed-off-by: Jonathan Jones <gitmaster@thespooky.house>
| * | Resolved issues with tests not receiving exactly what they expected.skippy2019-11-171-1/+1
| | | | | | | | | | | | | | | | | | Resolved new method in linux_user not returning the correct array. Signed-off-by: Jonathan Jones <gitmaster@thespooky.house>
| * | Fixed my bad typing and misplaced colons.skippy2019-11-171-1/+1
| | | | | | | | | | | | Signed-off-by: Jonathan Jones <gitmaster@thespooky.house>
| * | Modifed linux_user resource to add an additional 'returns' field to each ↵skippy2019-11-171-5/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | action method s hell_out reference. This fixes an issue related to certain commands returning non-0 exit codes but still functioning as exptected Signed-off-by: Jonathan Jones <gitmaster@thespooky.house>
* | | [yum_repository] Add indentation for multiple baseurlsNoam Lerner2019-12-041-1/+1
| |/ |/| | | | | Signed-off-by: Noam Lerner <noamler@fb.com>
* | Convert reboot resource to a custom resource with descriptionsTim Smith2019-11-181-78/+0
|/ | | | | | This is a simple resource. It's way easier to understand in a single file. Signed-off-by: Tim Smith <tsmith@chef.io>
* Add chef-utils gem with various recipe DSL helpersLamont Granquist2019-11-0822-51/+54
| | | | | | | | | | | | | This is the implementation of [RFC-087](https://github.com/chef-boneyard/chef-rfc/blob/master/rfc087-distro-sugar-helpers.md) although some of the specifics have been iterated on and changed. The documentation will be in the [README.md](https://github.com/chef/chef/tree/master/chef-utils/README.md) once this is merged. While this PR mostly moves chef-sugar utilities into core-chef via this chef-utils gem, the scope of the chef-utils gem should be considered larger than just that. As an example this PR moves the Mash class into this gem for reuse in ohai as well. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Merge pull request #9047 from jaymzh/fix_enableLamont Granquist2019-11-042-2/+30
|\ | | | | service/systemd_unit: Don't try to reenable services in an indirect status
| * Fix enable on indirect unitsPhil Dibowitz2019-11-042-2/+30
| | | | | | | | | | | | | | | | | | This follows this `is_masked` path to ensure we don't try to enable OR disable systemd units if they are indirect Fixes #9041 Signed-off-by: Phil Dibowitz <phil@ipom.com>
* | Updates for Chefstyle with Rubocop 0.75.1Tim Smith2019-11-041-1/+1
| | | | | | | | | | | | This update found a few things that should have been triggering before. Signed-off-by: Tim Smith <tsmith@chef.io>
* | systemd_unit needs to logPhil Dibowitz2019-11-011-0/+12
|/ | | | | | closes #9045 Signed-off-by: Phil Dibowitz <phil@ipom.com>
* Merge pull request #8961 from jeremyhage/fix-windows-package-path-envTim Smith2019-10-142-5/+5
|\ | | | | Avoid a PATH environment variable update before a windows package install
| * Avoid a PATH environment variable update before a windows package installJeremy HAGE2019-10-072-5/+5
| | | | | | | | Signed-off-by: Jeremy HAGE <jha@jsh-consulting.com>
* | Fix yum & dnf shellout if exit with nonzero status (#8972)Lamont Granquist2019-10-102-6/+16
|\ \ | | | | | | Fix yum & dnf shellout if exit with nonzero status
| * | Fix chefstyleVivek Singh2019-10-102-0/+2
| | | | | | | | | | | | Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
| * | Update exception messageVivek Singh2019-10-092-10/+4
| | | | | | | | | | | | Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
| * | Fix yum & dnf shellout if exit with nonzero statusVivek Singh2019-10-092-6/+20
| |/ | | | | | | Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* | Update windows_service to ignore run_as_user caseJason Barnett2019-10-101-1/+1
|/ | | | Signed-off-by: Jason Barnett <jason.w.barnett@gmail.com>
* Merge pull request #8765 from ↵Lamont Granquist2019-09-181-3/+11
|\ | | | | | | | | MsysTechnologiesllc/Kapil/MSYS-1015_chocolatey_package_fails_using_extra_options Fix for chocolatey_package fails using extra options
| * Fix for chocolatey_package fails using extra optionsKapil Chouhan2019-09-091-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Kapil Chouhan <kapil.chouhan@msystechnologies.com> Fixed buildkite failure Signed-off-by: Kapil Chouhan <kapil.chouhan@msystechnologies.com> update require changes according to internal review comments Signed-off-by: Kapil Chouhan <kapil.chouhan@msystechnologies.com> Fix for MSYS-1015 chocolatey_package fails using extra options Signed-off-by: Kapil Chouhan <kapil.chouhan@msystechnologies.com>
* | [macos] fix mac_user platform constraintsryan/fix-macos-buildRyan Cragun2019-09-101-20/+20
| | | | | | | | Signed-off-by: Ryan Cragun <ryan@chef.io>
* | Merge pull request #8869 from ↵Tim Smith2019-09-101-1/+1
|\ \ | | | | | | | | | | | | MsysTechnologiesllc/Kapil/MSYS-1094_user_resource_does_not_handle_a_gid_specified_as_a_string Fix for user resource does not handle a gid specified as a string
| * | Fix for MSYS-1094 user resource does not handle a gid specified as a stringKapil chouhan2019-09-101-1/+1
| |/ | | | | | | Signed-off-by: Kapil chouhan <kapil.chouhan@msystechnologies.com>
* | Merge pull request #8775 from chef/ryancragun/mac_userTim Smith2019-09-092-2/+630
|\ \ | |/ |/| Add mac_user resource that is compatible with macOS >= 10.14
| * add functional testryancragun/mac_userRyan Cragun2019-09-031-4/+4
| | | | | | | | Signed-off-by: Ryan Cragun <ryan@chef.io>
| * Wrap all shell_out's that change the system in converge_byRyan Cragun2019-08-081-27/+26
| | | | | | | | Signed-off-by: Ryan Cragun <ryan@chef.io>
| * Make user and admin group plists first classRyan Cragun2019-07-291-111/+121
| | | | | | | | Signed-off-by: Ryan Cragun <ryan@chef.io>
| * remove validation that is now in the resourceRyan Cragun2019-07-291-11/+0
| | | | | | | | Signed-off-by: Ryan Cragun <ryan@chef.io>
| * Address review feedback round 1Ryan Cragun2019-07-261-96/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix 'iterations' description * Update 'gid' property, remove coercion, resolve group name and id in provider * Move validation of password value when given salt to resource property coercion * Restructure exception handling around calls * Don't re-map properties onto current_resource after load_current_resource * Execute inline group resources with run_action * Always set the home directory when creating a user * Poll for user creating instead of a hard sleep * Remove old ascii encoding copy pasta Signed-off-by: Ryan Cragun <ryan@chef.io>