summaryrefslogtreecommitdiff
path: root/lib/chef/resource/execute.rb
Commit message (Collapse)AuthorAgeFilesLines
* include password in guard inherited attributesguard_passwordmwrock2020-11-201-0/+2
| | | | Signed-off-by: mwrock <matt@mattwrock.com>
* A bit more formattingTim Smith2020-11-031-1/+1
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Resource documentation updates from reviewTim Smith2020-10-151-3/+3
| | | | | | More stuff from the docs side Signed-off-by: Tim Smith <tsmith@chef.io>
* Resolve Style/RedundantCondition copTim Smith2020-09-161-1/+1
| | | | | | We have some extra conditionals that aren't getting us anything Signed-off-by: Tim Smith <tsmith@chef.io>
* Workaround rubygems slow requires by only running require for chef-utils/distLance Albertson2020-09-151-1/+1
| | | | Signed-off-by: Lance Albertson <lance@osuosl.org>
* merge all dist files back into dist.rbMarc Chamberland2020-09-151-1/+1
| | | | | Signed-off-by: Marc Chamberland <chamberland.marc@gmail.com> Signed-off-by: Lance Albertson <lance@osuosl.org>
* tighten all require statements for dist implementationMarc Chamberland2020-09-151-1/+1
| | | | | Signed-off-by: Marc Chamberland <chamberland.marc@gmail.com> Signed-off-by: Lance Albertson <lance@osuosl.org>
* move dist implementation into chef-utilsMarc Chamberland2020-09-151-5/+5
| | | | | Signed-off-by: Marc Chamberland <chamberland.marc@gmail.com> Signed-off-by: Lance Albertson <lance@osuosl.org>
* double quotes in example for string interpolationKarl Amrhein2020-08-121-2/+2
| | | | | | | | | | | | | | | | | | | | In the example: ``` execute 'test_rule' do command 'command_to_run --option value --option value --source \#{node[:name_of_node][:ipsec][:local][:subnet]} -j test_rule' action :nothing end ``` that example command would not run correctly because the variable #{node{node[:name_of_node][:ipsec][:local][:subnet]} would not be evaluated. changing to double quotes fixes the example. Obvious fix.
* Remove unused instance variable.Pete Higgins2020-08-071-1/+0
| | | | | | | Introcduced 12 years ago, probably just cruft that never got cleaned up: https://github.com/chef/chef/commit/f826880c267755005fccb93bdac6105a3a8e24b2 Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Update to Chefstyle 1.2 + some fixeschefstyle12Tim Smith2020-07-141-2/+2
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Fix execute resource with integer user parameter.Pete Higgins2020-07-131-2/+2
| | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Cleanup more resource examplesdocumentationTim Smith2020-06-161-76/+10
| | | | | | In execute remove some complex examples that weren't adding much. Also cleanup some of the ruby code so that it would pass cookstyle. Also improve the dist values we use, random formatting, and how we specify notes so they get parsed out correctly. Signed-off-by: Tim Smith <tsmith@chef.io>
* Fix some spelling violations.Pete Higgins2020-06-041-1/+1
| | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Escape interpolation in code examples.add-input-property-to-executePete Higgins2020-05-261-13/+13
| | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Add an example using the input property.Pete Higgins2020-05-261-0/+6
| | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Add examples for execute resource.Pete Higgins2020-05-261-0/+521
| | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Reformat description and add note.Pete Higgins2020-05-261-4/+9
| | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Fix property definition according to PR feedback.Pete Higgins2020-05-261-2/+2
|
* Add an input property to the execute resource for passing input on STDIN.Pete Higgins2020-05-261-0/+4
| | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Get lib/ free of spelling violations.Pete Higgins2020-05-181-1/+1
| | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Add missing examples and resource formatting for docs siteTim Smith2020-04-301-2/+2
| | | | | | Get us closer to automated documentation. Signed-off-by: Tim Smith <tsmith@chef.io>
* Give execute resource a proper timeout defaulttimeoutsTim Smith2020-04-131-1/+2
| | | | | | This should just be done on the resource instead of hacking it into the provider Signed-off-by: Tim Smith <tsmith@chef.io>
* Updates to timeout properties in resourcesTim Smith2020-04-131-9/+10
| | | | | | | | | 1) make sure they all have desired state false 2) Fix some indentation 3) Fix portage_package to have a type of String/Integer to match package 4) Add the String type to paludis_package to match the package default Signed-off-by: Tim Smith <tsmith@chef.io>
* Remove copyright dateslcg/remove-copyright-datesLamont Granquist2020-04-131-1/+1
| | | | | | | | Legally incredibly dubious, particularly since we don't follow it strictly as policy, and we have git history instead, which does it right. This is just a waste of time and a cargo cult. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* remove redundant identityLamont Granquist2020-04-021-1/+1
| | | | | | | | | | | name_property implies identity if there is no other identity property this has been the behavior for a very long time, dunno why #4282 was never closed. closes #4282 Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Remove the canonical DSLLamont Granquist2020-03-031-2/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Use the chef-utils helpers in our resourcesTim Smith2020-02-251-1/+1
| | | | | | Use the helpers we now ship to simplify platform detection. Signed-off-by: Tim Smith <tsmith@chef.io>
* Turn on unified_mode for 35 core resourcesLamont Granquist2019-10-281-0/+2
| | | | | | | | | These are the ones that off of the top of my head it should be perfectly safe to turn on `unifed_mode` with minimal auditing. Most of these are so old that they do not use any sub-resources at all. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* lazy procs are instance_exec in the resource alreadyLamont Granquist2019-07-051-2/+2
| | | | | | | | exposed by Style/SymbolProc mangling some bad code. no idea how this ever worked. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Layout/AlignArgumentslcg/new-chefstyleLamont Granquist2019-07-021-13/+13
| | | | | | | | | | | | | | this is using: Layout/AlignArguments: Enabled: true EnforcedStyle: with_fixed_indentation the default style can use really excessive whitespace. on starting lines which are already long, it fully indents across to where the arguments start and then begins the line there. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* More distro constant applicationsMarc Chamberland2019-05-231-2/+2
| | | | Signed-off-by: Marc Chamberland <mchamberland@pbsc.com>
* fix a bunch of weirdly mangled require linesLamont Granquist2019-05-081-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Convert require to require_relativeLamont Granquist2019-05-081-2/+2
| | | | | | | This gives a speed boost since rubygems does not have to scan through every gem in the gemset in order to find the file. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Target Mode initial implementationBryan McLellan2019-05-061-1/+2
| | | | Signed-off-by: Bryan McLellan <btm@chef.io>
* chef-client => Chef::Dist::CLIENTMarc Chamberland2019-04-261-2/+3
| | | | Signed-off-by: Marc Chamberland <mchamberland@pbsc.com>
* Add misc YARD commentsyard3Tim Smith2019-03-111-0/+3
| | | | | | A pile of misc yard I added as I was reading things. Signed-off-by: Tim Smith <tsmith@chef.io>
* Added back the resource name as per reviewVasu11052019-01-311-0/+1
| | | | Signed-off-by: Vasu1105 <vasundhara.jagdale@msystechnologies.com>
* Fixed review comments.Vasu11052019-01-301-1/+1
| | | | Signed-off-by: Vasu1105 <vasundhara.jagdale@msystechnologies.com>
* Fixed typoVasu11052019-01-301-1/+1
| | | | Signed-off-by: Vasu1105 <vasundhara.jagdale@msystechnologies.com>
* Conver execute_resource to use properties.Vasu11052019-01-301-13/+6
| | | | Signed-off-by: Vasu1105 <vasundhara.jagdale@msystechnologies.com>
* Replace several uses of attribute with property in resourcesattribute_is_propertyTim Smith2018-11-151-1/+1
| | | | | | We were still calling things attributes when they're actually properties. This fixes some documentation and error messages. Signed-off-by: Tim Smith <tsmith@chef.io>
* Updates from the review of #7929Tim Smith2018-11-151-1/+1
| | | | | | Thanks @tyler-ball Signed-off-by: Tim Smith <tsmith@chef.io>
* Improve resource descriptions for documentationTim Smith2018-11-141-1/+1
| | | | | | Mostly cleaning up how we describe name properties, but also copying over some edits that happened on the docs site. Signed-off-by: Tim Smith <tsmith@chef.io>
* Skip more resources and set others to desired state falseresource_descriptionsTim Smith2018-10-301-1/+1
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Update descriptions and add default_description fieldsTim Smith2018-10-301-1/+1
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Add additional resource descriptionsTim Smith2018-09-061-1/+4
| | | | | | Filling in more of the missing resource descriptions using the descriptions straight from the docs site. Signed-off-by: Tim Smith <tsmith@chef.io>
* Remove some default values in descriptionsTim Smith2018-07-251-3/+3
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Add descriptions to the execute resourceTim Smith2018-07-251-13/+38
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* fix Style/HashSyntaxLamont Granquist2018-07-021-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>