summaryrefslogtreecommitdiff
path: root/lib/chef/resource
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Merge pull request #5529 from chef/tas50/apt_preferenceTim Smith2017-07-271-0/+36
|\ | | | | Apt: Add apt_preference resource from apt cookbooks
| * Testing updatesTim Smith2017-05-121-1/+1
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Chefstyle fixesTim Smith2017-05-121-1/+1
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Wire up provider/resource and use constants so we can testTim Smith2017-05-121-1/+1
| | | | | | | | | | | | Also allow the pin priority to be an integer since there's no reason that needs to be a string Signed-off-by: Tim Smith <tsmith@chef.io>
| * Require pin/pin_priority and update copyrightsTim Smith2017-05-121-3/+3
| | | | | | | | | | | | The resource fails without these values. Let's require them to give the user a proper error message Signed-off-by: Tim Smith <tsmith@chef.io>
| * Initial apt_preference commitTim Smith2017-05-121-0/+36
| | | | | | | | | | | | Specs are a placeholder on the provider side Signed-off-by: Tim Smith <tsmith@chef.io>
* | [MSYS-629] Added username/password validation for elevated option (#6293)Nimisha Sharad2017-07-261-0/+4
| | | | | | | | | | | | * Added username/password validation for elevated option with specs Signed-off-by: nimisha <nimisha.sharad@clogeny.com>
* | Merge pull request #6131 from jamesbroadhead/add_HTTP_PATCHThom May2017-07-241-1/+1
|\ \ | | | | | | Add support for HTTP PATCH requests
| * | Add support for HTTP PATCH requestsJames Broadhead2017-05-081-1/+1
| | | | | | | | | | | | Signed-off-by: James Broadhead <james.broadhead@mongodb.com>
* | | Added :elevated option for powershell_script resourceNimishaS2017-07-191-2/+8
| | | | | | | | | | | | Signed-off-by: NimishaS <nimisha.sharad@msystechnologies.com>
* | | Fix a typo in the breakpoint resource nameTim Smith2017-06-081-1/+1
| | | | | | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* | | remove stray load_current_resourceLamont Granquist2017-05-251-3/+0
| | | | | | | | | | | | | | | | | | copypasta mistake from the old provider Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | | convert breakpoint resource to a custom resourceLamont Granquist2017-05-251-0/+15
| |/ |/| | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | Merge pull request #6105 from Stromweld/patch-1Matt Wrock2017-05-101-2/+2
|\ \ | |/ |/| Updated to fix day validation with monthly frequency
| * Updated to fix day validation with monthly frequencyCorey Hemminger2017-04-281-2/+2
| | | | | | | | This should fix issue #6104 Signed-off-by: Corey Hemminger <corey.hemminger@nativex.com>
* | Adding functional specs for windows_task resource (#6067)Nimisha Sharad2017-05-081-1/+1
|/ | | | | | * Added functional specs for windows_task resource Signed-off-by: nimisha <nimisha.sharad@msystechnologies.com>
* Feed the rubocop.Noah Kantrowitz2017-04-111-2/+2
| | | | Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
* Put in some temporary hacks for the service and user resource for cases ↵Noah Kantrowitz2017-04-112-9/+11
| | | | | | | | where the tests assumed nillable properties. This will get cleaned up when they are converted to real properties. Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
* Convert the env and route resources to property style to get nillable setters. Noah Kantrowitz2017-04-112-142/+16
| | | | Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
* Merge pull request #5886 from MsysTechnologiesllc/nim/windows_taskThom May2017-04-061-0/+237
|\ | | | | Adding windows_task resource
| * Fixed review comments by thommaynimisha2017-04-061-1/+1
| | | | | | | | Signed-off-by: nimisha <nimisha.sharad@msystechnologies.com>
| * Fixed Rubocop style issues and review commentsnimisha2017-03-311-237/+237
| | | | | | | | Signed-off-by: nimisha <nimisha.sharad@msystechnologies.com>
| * Using chcp 437 and fixed some bugsnimisha2017-03-311-3/+7
| | | | | | | | Signed-off-by: nimisha <nimisha.sharad@msystechnologies.com>
| * Accepting random_delay and execution_time_limit in secondsnimisha2017-03-311-2/+56
| | | | | | | | Signed-off-by: nimisha <nimisha.sharad@msystechnologies.com>
| * Fixed Idempotency checknimisha2017-03-311-4/+9
| | | | | | | | Signed-off-by: nimisha <nimisha.sharad@msystechnologies.com>
| * Removed :change action. Moved validations to after_creatednimisha2017-03-311-3/+102
| | | | | | | | Signed-off-by: nimisha <nimisha.sharad@msystechnologies.com>
| * Updated random_delay implementation and added execution_time_limit propertynimisha2017-03-311-0/+10
| | | | | | | | Signed-off-by: nimisha <nimisha.sharad@msystechnologies.com>
| * Added support for random_delay optionnimisha2017-03-311-0/+1
| | | | | | | | Signed-off-by: nimisha <nimisha.sharad@msystechnologies.com>
| * Adding windows_task resourcenimisha2017-03-311-0/+64
| | | | | | | | Signed-off-by: nimisha <nimisha.sharad@msystechnologies.com>
* | Chef-13: better solution to gem_package source issueslcg/chef-13-gem-package-take-2Lamont Granquist2017-04-051-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I think this is better - Chef::Config[:rubygems_uri] is nearly always applied (but could be set to nil if someone really wanted to opt-out) - the per-resources sources are additive on top of the global config (lets cookbooks be additive to global config rather than override it by default). - there's a new flag for if you want to opt-out of the global config completely on a per-resource basis. So I think this gets the most commmon and the next most common use cases correct, while still allow people with arbitrarily crazy needs to write resources that do it. The RELEASE_NOTES also have somewhat better user stories in them, which I think suggests that I'm on the right track here. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | ActionClass doesn’t need use_inline_resources anymore.Noah Kantrowitz2017-04-041-2/+0
| | | | | | | | Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
* | Very minor follow up to ↵Noah Kantrowitz2017-04-041-1/+0
| | | | | | | | | | | | https://github.com/chef/chef/commit/81db0e0cfc218169a70a8178f83c567b467d2e6c Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
* | Chef-13: tweaks to rubygems source option for urlsLamont Granquist2017-04-041-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default now we don't pass any --source option or set the `Chef::Config[:rubygems_url]` to anything. This is so that if there is external config for rubygems sources we will simply have rubygems pick it up and use it (the resource acts like the command line). There is also no more magic around `--clear-sources` and if you set the property it sets the flag. If the `Chef::Config[:rubygems_url]` setting is set then that becomes the default `--source` flag sent to the command. This also supports Arrays now. If the `source` option is set to a URI (it can also be set to a filesystem path for poorly-designed-API reasons) then we do not use the default values at all. This may be an API break but this much more clearly allows users to override individual resources and is more declarative. You get what you type. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | Merge branch 'master' into freeze-property-defaultNoah Kantrowitz2017-04-043-4/+7
|\ \ | | | | | | | | | Signed-off-by: Noah Kantrowitz <noah@coderanger.net>