summaryrefslogtreecommitdiff
path: root/lib/chef/resource
Commit message (Collapse)AuthorAgeFilesLines
* Update ohai resource to new style, stop overwriting name propertyadamleff/update-ohai-resourceAdam Leff2016-12-021-25/+5
| | | | | | | | | | | | | If #5606 is approved, any resource that creates a property that is an already-existing Ruby method on a Chef::Resource object will throw a deprecation warning. The ohai resource currently creates a `name` property which conflicts with the `name` property created in the base Chef::Resource class. This change updates the ohai resource and provider to the new style of defining resources and stops overwriting the `name` method. Signed-off-by: Adam Leff <adam@leff.co>
* Alias unmount to umount for mount resourceGrant Ridder2016-11-301-1/+1
| | | | | | | | Allows the usage of `action :unmount` to `umount` a mount point Closes https://github.com/chef/chef/issues/5595 Signed-off-by: Grant Ridder <shortdudey123@gmail.com>
* Merge pull request #5547 from chef/lcg/unified-integerLamont Granquist2016-11-162-3/+3
|\ | | | | Core: fix Lint/UnifiedInteger cop
| * fix Lint/UnifiedInteger copLamont Granquist2016-11-152-3/+3
| | | | | | | | | | | | believe this becomes necessary for ruby 2.4/3.0 Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | Merge pull request #5460 from chef/tm/deprecation_with_urlThom May2016-11-163-6/+5
|\ \ | | | | | | Core: Structure deprecations with additional metadata
| * | Structure deprecations with additional metadatatm/deprecation_with_urlThom May2016-11-163-6/+5
| |/ | | | | | | | | | | | | | | This adds URLs to each class of deprecation, and correctly prints and formats them for maximum user efficiency. We also provide the URL to the data collector for Visibility to ingest. Signed-off-by: Thom May <thom@chef.io>
* | msu_package resource for Microsoft Update packagesNimishaS2016-11-161-0/+47
|/ | | | | | Signed-off-by: NimishaS <nimisha.sharad@msystechnologies.com> Signed-off-by: NimishaS <nimisha.sharad@msystechnologies.com>
* Merge pull request #5315 from ↵Bryan McLellan2016-11-111-0/+41
|\ | | | | | | | | MsysTechnologiesllc/dh/adding_powershell_package_manager_support Adding support for Powershell package manager to Chef package provider
| * Added unit specs for powershell packagedheerajd-msys2016-11-101-2/+2
| | | | | | | | Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
| * Added code for adding support for powershell package managerdheerajd-msys2016-11-101-0/+41
| | | | | | | | Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
* | Respond to review comments and chefstyletm/rescue_5115Thom May2016-11-101-13/+12
| | | | | | | | Signed-off-by: Thom May <thom@chef.io>
* | Code style fixes; :lipstick:Andrew Burns2016-11-101-1/+1
| |
* | launchd: start_calendar_interval validity checkingAndrew Burns2016-11-101-1/+42
|/ | | | | | | | | | | | | | | | | | | | | StartCalendarInterval has some gotchas so we coerce it to sanity check. According to `man 5 launchd.plist`: StartCalendarInterval [is a] <dictionary of integers or array of dictionaries of integers> ... Missing arguments are considered to be wildcard. What the man page doesn't state, but what was observed (OSX 10.11.5, launchctrl v3.4.0) is that key that are specified, _but with invalid values, will also be silently treated as a wildcard values. This means that an entry like: { "Hour"=>0, "Weekday"=>"6-7"} will not just run on midnight of Sat and Sun, rather it will run _every_ midnight. We check to make sure that the values are integers and not strings, adhering to the manpage documentation. This also ensures that only keys that StartCalendarInterval supports will be passed. This eliminates passing a key (like `:hour` or `'hour') and thinking it works when in reality launchd is just treating it as a wildcard. NOTE: This is a "breaking" change in that: it will break existing cookbooks that are using the current docs: https://docs.chef.io/resource_launchd.html (See start_calendar_interval); however the generated plist doesn't appear to actually do what was intended anyway.
* String to Array launchd:limit_load_to_session_type (#5424)Erik Gomez2016-11-081-1/+1
| | | Mac: Ensure that launchd limit_load_to_session_type is properly handled
* Prevent apt_update failures on non-Linux platformstas50/apt_update_failsTim Smith2016-11-071-1/+1
| | | | | | | | | | | | We 1/2 wired up the noop functionality, but specifying that we only provided the resource on Linux caused that code to never run. This prevents this sort of error on non-Linux platforms: ``` Cannot find a resource for apt_update on windows version 6.3.9600 ``` Signed-off-by: Tim Smith <tsmith@chef.io>
* Merge pull request #5395 from b1-systems/locking_Thom May2016-10-311-1/+1
|\ | | | | package locking for apt, yum and zypper
| * implement lockingc52275322016-09-281-1/+1
| |
* | Merge pull request #5476 from tas50/copyrightsLamont Granquist2016-10-211-1/+1
|\ \ | | | | | | Fix copyrights and update a few more Opscode references to Chef
| * | Fix a few bad copyrightsTim Smith2016-10-201-1/+1
| | | | | | | | | | | | | | | | | | I think this happened when we merged the Opscode and Chef copyrights Signed-off-by: Tim Smith <tsmith@chef.io>
* | | Merge pull request #5474 from tas50/yum_propertyLamont Granquist2016-10-211-1/+1
|\ \ \ | | | | | | | | Use property vs. attribute in yum_repository
| * | | Use property vs. attribute in yum_propertyTim Smith2016-10-191-1/+1
| | |/ | |/| | | | | | | | | | | | | We just auto replace the attribute call with a property call here. We might as well use the right one to start with. Signed-off-by: Tim Smith <tsmith@chef.io>
* | | the password is also not desired_statelcg/make-scm-password-sensitiveLamont Granquist2016-10-191-1/+1
| | | | | | | | | | | | | | | | | | should property-ize the rest of this as well Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | | convert scm_password to property + make sensitiveLamont Granquist2016-10-191-7/+1
| |/ |/| | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | Merge pull request #5398 from shortdudey123/fix_yum_repository_gpgcheckTim Smith2016-09-301-1/+1
|\ \ | | | | | | Set yum_repository gpgcheck default to true
| * | Set yum_repository gpgcheck default to trueGrant Ridder2016-09-281-1/+1
| |/ | | | | | | Fixes https://github.com/chef/chef/issues/5397
* | Merge pull request #5359 from ↵Bryan McLellan2016-09-301-3/+3
|\ \ | | | | | | | | | | | | MsysTechnologiesllc/ali/windows_registry_key_resource_delete_fix Allow deletion of registry_key without the need for users to pass data key in values hash.
| * | Allow deletion of registry_key without the need for users to pass type and ↵aliasgar162016-09-301-3/+3
| |/ | | | | | | | | | | data key in values hash. Signed-off-by: aliasgar16 <aliasgar.batterywala@msystechnologies.com>
* | Added resource and provider for cab packageVasu11052016-09-301-0/+44
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reverted changes Adding resource and provider for cab file support Added method identifying package version for installation and removal of package Updated code to idetitfy installed version refactored some code Refactored code for parsing dism get package output Fixed rubocop issue, working on specs created spec files Working on unit specs Added unit specs and working on functional specs Working on functional specs and fixed rubocop errors Fixed failing unit test cases Resolved rubucop style error Removed functional specs Fixed error and working on functional specs Added missing functional spec file
* Fix makecache action name in yum_repositorymakecacheTim Smith2016-09-191-1/+1
| | | | | | | | | Our allowed action in the resource doesn't match the action name in the provider. makecache is the correct action not make_cache: https://github.com/chef-cookbooks/yum/blob/master/providers/repository.rb#L100 Signed-off-by: Tim Smith tsmith@chef.io
* add a test for non-utf8 chars in filenames in the file provider (#5335)Lamont Granquist2016-09-161-1/+1
| | | fix non-utf8 filename issues in the file provider (again)
* Make 12.5+ custom resources whyrun safe by default.John Keiser2016-09-161-0/+4
| | | | | | (This was always intended to be the case, and it's difficult to do it yourself. We have been teaching people whyrun-safe methods to make resources right alongside Custom Resources, as well.)
* Merge pull request #5322 from chef/lcg/manage-home-fixLamont Granquist2016-09-152-12/+16
|\ | | | | revert supports[:manage_home] behavior
| * move deprecation warnings to superclassLamont Granquist2016-09-152-13/+14
| | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
| * fix typos in deprecation messageLamont Granquist2016-09-151-1/+1
| | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
| * revert supports[:manage_home] behaviorLamont Granquist2016-09-141-7/+10
| | | | | | | | | | | | | | even though i violently disagree that this is correct behavior and we're just going to break everyone in one massive go when we hit Chef 13. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | Add back compatibility with old property namesTim Smith2016-09-141-2/+5
| | | | | | | | | | | | In yum 3.0 we changed the properties in the documentation, but never threw deprecation notices. Since there was no notice you would have no way to know to use the new properties. We need to add back compatibility with the old names and if we really want to kill them throw a proper deprecation warning. Signed-off-by: Tim Smith <tsmith@chef.io>
* | More professional default nameTim Smith2016-09-141-1/+1
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* | Allow the :delete action for yum_repositoryTim Smith2016-09-141-1/+1
|/ | | | | | We weren't allowing the actual action to work. Oops Signed-off-by: Tim Smith <tsmith@chef.io>
* Merge pull request #5182 from erikng/masterThom May2016-09-061-1/+1
|\ | | | | Add Hash type to launchd:keep_alive
| * Add Hash type to launchd:keep_aliveErik Gomez2016-08-081-1/+1
| |
* | Make rubocop happyPhil Dibowitz2016-08-261-10/+12
| |
* | Use bad style just for rspecPhil Dibowitz2016-08-261-2/+3
| |
* | Fix flush_cache issues in yum_packagePhil Dibowitz2016-08-261-11/+9
| | | | | | | | Fixes #4691. I hope.
* | Merge pull request #5243 from chef/lcg/rewrite-linux-user-providerLamont Granquist2016-08-241-2/+1
|\ \ | | | | | | Rewrite linux useradd provider
| * | set manage_home default back to falseLamont Granquist2016-08-231-2/+1
| | | | | | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | | Create and delete yum repositoriesThom May2016-08-241-0/+76
|/ / | | | | | | Signed-off-by: Thom May <thom@may.lt>
* | Add a warning for guard blocks that return a non-empty string.Noah Kantrowitz2016-08-221-1/+9
| | | | | | | | | | | | | | This will hopefully catch errors like this: myresource 'name' do not_if { 'some command' } end
* | user provider manage_home behavior and refactorLamont Granquist2016-08-197-3/+210
|/ | | | | | | | | split out the user provider into 1:1 resources. fix the behavior of the linux user provider to implement manage_home behavior correctly. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Fix freebsd_package to use new node syntax and detect os_version correctlyJohn Keiser2016-08-031-1/+1
|
* Merge pull request #4979 from andrewjamesbrown/masterThom May2016-05-311-1/+6
|\ | | | | Fix #4949 and Avoid Errno::EBUSY on docker containers