summaryrefslogtreecommitdiff
path: root/lib/chef/resource
Commit message (Collapse)AuthorAgeFilesLines
* Remove author yard commentsmodernize_log_resourceTim Smith2017-12-151-3/+0
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Modernize the log resourceTim Smith2017-12-151-46/+19
| | | | | | General cleanup Signed-off-by: Tim Smith <tsmith@chef.io>
* Merge pull request #6665 from chef/yard2Tim Smith2017-12-144-3/+28
|\ | | | | Add a few more YARD comments to resources
| * Cleanup some YARD warningsyard2Tim Smith2017-12-131-1/+1
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Add a few more comments to resourcesTim Smith2017-12-133-2/+27
| | | | | | | | | | | | I try to add them as I read through resources Signed-off-by: Tim Smith <tsmith@chef.io>
* | Don't use .match? which is Ruby 2.4+ onlyTim Smith2017-12-141-2/+4
|/ | | | | | | Added a todo to fix this when Ruby 2.3 support goes away since it's 3x faster Signed-off-by: Tim Smith <tsmith@chef.io>
* Fix the time regex and improve the error messageTim Smith2017-12-081-1/+1
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* These are all input validation errors so they should raise ArgumentError not ↵more_taskTim Smith2017-12-081-7/+5
| | | | | | RuntimeError Signed-off-by: Tim Smith <tsmith@chef.io>
* Use integer for numeric evaluationTim Smith2017-12-081-2/+3
| | | | | | Why is this not just in the duration calculator? Well we use it in two places and I would have had to add the same logic in both of those places. It's nice and easy to read this way Signed-off-by: Tim Smith <tsmith@chef.io>
* Properly handle an ISO8601 duration of 0 secondsTim Smith2017-12-081-2/+1
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Improve the integer/string warning messageTim Smith2017-12-071-2/+2
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Validate the start_date is correctly passedTim Smith2017-12-071-1/+4
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Explain what PT72H isTim Smith2017-12-071-1/+1
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* allow random_delay and execution_time_limit to be integers and properly validateTim Smith2017-12-071-22/+24
| | | | | | Also set the default the right way with execution_time_limit Signed-off-by: Tim Smith <tsmith@chef.io>
* Validate that starttime is actually in HH:mm formatTim Smith2017-12-071-4/+5
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Improve the passwordless user error, logic, and testsimproved_task_loggingTim Smith2017-12-061-7/+6
| | | | | | Specify exactly what we're checking for in the error. This needs to go into the docs site as well. Signed-off-by: Tim Smith <tsmith@chef.io>
* Attribute -> Property and remove double spacesTim Smith2017-12-061-10/+10
| | | | | | These are properties not attributes. Signed-off-by: Tim Smith <tsmith@chef.io>
* Clarify that we're talking about the 1 and only SYSTEM user hereTim Smith2017-12-061-1/+1
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* add unit_name identity property to systemd_unitNathan Williams2017-11-281-0/+3
| | | | Signed-off-by: Nathan Williams <nath.e.will@gmail.com>
* Merge pull request #6468 from coderanger/deprecate-deployNoah Kantrowitz2017-10-191-0/+6
|\ | | | | Deprecate the deploy resource and family
| * Deprecate the deploy resource and family.Noah Kantrowitz2017-10-031-0/+6
| | | | | | | | Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
* | Merge pull request #6394 from ↵Bryan McLellan2017-10-131-7/+12
|\ \ | | | | | | | | | | | | chef/ash/add_none_frequency_to_windows_task_resource Windows: Added :none frequency to windows_task resource
| * | Added none frequency to windows task resourceNAshwini2017-09-201-7/+12
| | | | | | | | | | | | Signed-off-by: NAshwini <ashwini.nehate@msystechnologies.com>
* | | pick up dnf on amazon linux more dynamicallylcg/dnf-platform-tweaksLamont Granquist2017-10-101-0/+5
| | | | | | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | | only rhel >= 8 and fedora >= 22 get dnfLamont Granquist2017-10-101-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the shell_out approach to parse the version string from rpm is a bit of a failed experiment. the shell_out that gets incurred on every package provider is a bit terrible for performance. DNF < 1.00 has also never formally landed in any distribution and its very difficult at this point to deploy it. when amazon deploys DNF we should add a version comparison for that. If this patch causes issues we can go back to adding some form of `provides :package ... { which("dnf" }` That will be much faster than having the shell_out(). Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | | add allow_downgrade to zypper_package resourceEike Waldt2017-10-061-0/+1
| | | | | | | | | | | | Signed-off-by: Eike Waldt <waldt@b1-systems.de>
* | | Merge pull request #6435 from NaomiReeves/fix_dnf_resourceThom May2017-10-031-1/+3
|\ \ \ | |_|/ |/| | dnf_resource: be more specific for rhel packages
| * | dnf_resource: be more specific for rhel packagesNaomi Reeves2017-09-291-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With #6351 and #6377, the DNF package provider was fixed to use yum by default on RHEL 7, but the resource was still calling the DNF provider if it happened to be installed. We want to use the default of yum for RHEL 7, and only use DNF if we call `set_priority_map` directly. Signed-off-by: Naomi Reeves <naomi.c.reeves@gmail.com> Resolves: Unexpectedly switching package managers
* | | Allow specifying the cookbook for the source templateTim Smith2017-09-281-0/+1
|/ / | | | | | | | | | | Also fix the cookbook_file lookup logic missing a method it needed for file based keys Signed-off-by: Tim Smith <tsmith@chef.io>
* | Fixed mistake added while removing old :password attribute definitionDmitry Shestoperov2017-09-261-1/+0
| | | | | | | | Signed-off-by: Dmitry Shestoperov <dmitry@shestoperov.info>
* | password property of mount resurce is sensitiveDmitry Shestoperov2017-09-261-8/+3
| | | | | | | | Signed-off-by: Dmitry Shestoperov <dmitry@shestoperov.info>
* | Add support for metalink and throttle in yum_repositoryyum_repoTim Smith2017-09-211-1/+4
| | | | | | | | | | | | metalink shipped in Fedora 10. I'm not sure about throttle as it doesn't google well, but there's references to it going back 5 years at least. Signed-off-by: Tim Smith <tsmith@chef.io>
* | Sort yum repository options alphabeticallyTim Smith2017-09-211-8/+8
|/ | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Open apt resources up to prevent breaking changeapt_openTim Smith2017-09-173-3/+3
| | | | | | | | | If we want these to throw a no ops vs. a hard failure we need them to be wide open. Since a lot of people (including all of chef-cookbooks) have coded as if these will gracefully skip this would have been a breaking change. Signed-off-by: Tim Smith <tsmith@chef.io>
* Remove the usage of an array for the platform_familyapt_resourcesTim Smith2017-09-144-4/+4
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Replace which apt-get check with simple debian check in apt resourcesTim Smith2017-09-143-4/+4
| | | | | | apt-get is a link to yast2 in suse so these resources fire there when someone wouldn't expect them to. Looking back we probably should have skipped the whole platform based no-op thing, but that ship sailed. This makes it behave the way a user would expect it to. What happens if you have apt compiled on your gentoo box? Well it's going to break. We'll just have to live with fixing it for 99.99% of users instead of the current 95%. Also: This is faster. Signed-off-by: Tim Smith <tsmith@chef.io>
* Add options for bonding NICs on RHEL/CentosTom Doherty2017-09-071-0/+27
| | | | Signed-off-by: Tom Doherty <tom.doherty@fixnetix.com>
* Add support for specifying ETHTOOL_OPTS on Red HatTom Doherty2017-09-071-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as Indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. Signed-off-by: Tom Doherty <tom.doherty@fixnetix.com>
* Using LOGON32_LOGON_NEW_CREDENTIALS instead of LOGON32_LOGON_NETWORKnimisha2017-09-051-8/+0
| | | | Signed-off-by: nimisha <nimisha.sharad@msystechnologies.com>
* Fixing review commentsnimisha2017-09-051-5/+1
| | | | Signed-off-by: nimisha <nimisha.sharad@msystechnologies.com>
* Alternate user local logon authenticationnimisha2017-09-051-22/+62
| | | | Signed-off-by: nimisha <nimisha.sharad@msystechnologies.com>
* Access remote_file resource source files as alternate user on Windowsadamedx2017-09-051-0/+32
| | | | | Conflicts: spec/support/shared/functional/execute_resource.rb
* [x].flatten is better written as Array(x)Gavin Reynolds2017-09-011-1/+1
| | | | Signed-off-by: Gavin Reynolds <g.reynolds@src.gla.ac.uk>
* Support an array of keys for apt_repositoryGavin Reynolds2017-08-311-1/+1
| | | | Signed-off-by: Gavin Reynolds <g.reynolds@src.gla.ac.uk>
* Auto import gpg keys in zypper_repositoryzypper_repo_fixTim Smith2017-08-241-0/+1
| | | | | | Without this anything that's gpg signed will fail waiting for the user to accept or deny the key. If users don't want this I've provided a new property to disable it. Signed-off-by: Tim Smith <tsmith@chef.io>
* Fixed specsnimisha2017-08-161-1/+1
| | | | Signed-off-by: nimisha <nimisha.sharad@clogeny.com>
* Added windows_path resourcenimisha2017-08-161-0/+41
| | | | Signed-off-by: nimisha <nimisha.sharad@clogeny.com>
* Don't use provides twiceTim Smith2017-08-101-1/+0
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Maintain compat with old zypper_repo resource used in cookbookszypper2Tim Smith2017-08-101-0/+1
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Add zypper_repository resourceTim Smith2017-08-091-0/+51
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>