summaryrefslogtreecommitdiff
path: root/lib/chef/resources.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add selinux_user and selinux_login resources (#13511)wheatevo2023-03-071-0/+2
| | | | | | | | | * Add `selinux_user` resource to manage SELinux users. * Add `selinux_login` resource to manage OS login to SELinux user mapping. Related to PR https://github.com/sous-chefs/selinux/pull/92 Signed-off-by: Matthew Newell <matthew.newell@oracle.com>
* SELinux integration to infra client (#12694)neha-p62022-04-111-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 1. Add resources for SELlinux 2. Add common helper for SELinux under a new subdirectory 3. Wire files together with corresponding changes Signed-off-by: Neha Pansare <neha.pansare@progress.com> * 3. Include SElinux CommonHelper under action_class for corresponding resources as it uses shell_out! 4. Add SELinux config file templates for debian and default versions Signed-off-by: Neha Pansare <neha.pansare@progress.com> * 5.Add local mode true to correctly parse template from selinux_state resource Signed-off-by: Neha Pansare <neha.pansare@progress.com> * 6. Remove SELinux cookbook dependency from kitchen-tests as SELinux resources are now part of core chef client, update linux.rb recipe to use corresponding SELinux resources instead of include_recipe Signed-off-by: Neha Pansare <neha.pansare@progress.com> * 7. Add unit test cases for SELinux resources 8. Add documentation for SELinux resources Signed-off-by: Neha Pansare <neha.pansare@progress.com> * 9. Obvious fix: code linting and spellcheck Signed-off-by: Neha Pansare <neha.pansare@progress.com> * 10. Add code linting changes. 11. Add missing comma in cspell.json resulting in issue Signed-off-by: Neha Pansare <neha.pansare@progress.com> * 12. Add linting and spellcheck changes Signed-off-by: Neha Pansare <neha.pansare@progress.com> * 13. Add documentation for SELinux resources for all properties, actions with examples 14. Added permissive SELinux policy for en_to_end kitchen test Signed-off-by: Neha Pansare <neha.pansare@progress.com> * 15. Fix chefstyle linting 16. Update few shell_out calls to use array format of input parameters Signed-off-by: Neha Pansare <neha.pansare@progress.com>
* Native compliance phaseLamont Granquist2021-09-171-0/+2
| | | | | | | | | | | | compliance/{profiles,waivers,inputs} directories supported in cookbooks. include_profile, include_waiver, include_input as DSL methods to dynamically add compliance phase items to the run. inspec_waiver, inspect_input resources for additional sugar and a resource-like API. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Add windows_update_settings resourceTim Smith2021-07-201-0/+1
| | | | | | | Copied from the desktop-config cookbook and simplified a little bit to skip properties we can calculate automatically. Signed-off-by: Tim Smith <tsmith@chef.io>
* Add habitat resources + content rendering helpers for json/toml/yaml (#11577)Jeff Brimager2021-07-081-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commiting new resources to clean branch Signed-off-by: Jeff Brimager <jbrimager@chef.io> * reworked toml_dumper resource helper to make sure all end statements were correct and it was being made available to other resource Signed-off-by: Jeff Brimager <jbrimager@chef.io> * changing implementation of toml_deumper to match how the cron_validations helper was implemented Signed-off-by: Jeff Brimager <jbrimager@chef.io> * changing implementation of toml_dumper to match how the cron_validations helper was implemented Signed-off-by: Jeff Brimager <jbrimager@chef.io> * calling toml dumper as a method Signed-off-by: Jeff Brimager <jbrimager@chef.io> * testing new method for toml_dumper helper Signed-off-by: Jeff Brimager <jbrimager@chef.io> * adding "use" statement for toml helper in habitat_config and habitat_toml Signed-off-by: Jeff Brimager <jbrimager@chef.io> * fixing relational mapping with toml_dumper Signed-off-by: Jeff Brimager <jbrimager@chef.io> * using Chef::ResourceHelper::TomlDumper as method to create toml Signed-off-by: Jeff Brimager <jbrimager@chef.io> * correcting syntax error for Chef::ResourceHelpers:: in the habitat_config and habitat_user_toml resource Signed-off-by: Jeff Brimager <jbrimager@chef.io> * adding a render helper Signed-off-by: Jeff Brimager <jbrimager@chef.io> * moved files to correct directories for render_helpers and corrected resource syntax Signed-off-by: Jeff Brimager <jbrimager@chef.io> * chefstyle corrections Signed-off-by: Jeff Brimager <jbrimager@chef.io> * removed renderhelers form chef-utils. there by mistake Signed-off-by: Jeff Brimager <jbrimager@chef.io> * corrected class for render helpers Signed-off-by: Jeff Brimager <jbrimager@chef.io> * fixed broken end statement in chef/dsl/toml.rb Signed-off-by: Jeff Brimager <jbrimager@chef.io> * corrected render helper class syntax line 23. was set as a module ; Signed-off-by: Jeff Brimager <jbrimager@chef.io> * corrected dsl helper mapping for render_helpers in spec tests Signed-off-by: Jeff Brimager <jbrimager@chef.io> * wiring chef-utls/internal to render_helpers Signed-off-by: Jeff Brimager <jbrimager@chef.io> * remove "include internal" from render_helpers Signed-off-by: Jeff Brimager <jbrimager@chef.io> * removed old helper from habitat_config and habitat_user_toml resources Signed-off-by: Jeff Brimager <jbrimager@chef.io> * removed old helper from habitat_config and habitat_user_toml resources Signed-off-by: Jeff <jbrimager@gmail.com> * removed old helper from habitat_config and habitat_user_toml resources Signed-off-by: Jeff Brimager <jbrimager@chef.io> * chefstyle corrections on render_helpers_spec Signed-off-by: Jeff Brimager <jbrimager@chef.io> * chefstyle corrections on chef-utils/lib/chef-utils.rb Signed-off-by: Jeff Brimager <jbrimager@chef.io> * added all documentation to resources Signed-off-by: Jeff Brimager <jbrimager@chef.io> * cleaned up render_helper_spec.rb Signed-off-by: Jeff Brimager <jbrimager@chef.io> * cleaning up spellcheck errors Signed-off-by: Jeff Brimager <jbrimager@chef.io> * removing unused variable from habitat package provider Signed-off-by: Jeff Brimager <jbrimager@chef.io> * correecting bad syntaxt in habitat_package Signed-off-by: Jeff Brimager <jbrimager@chef.io> * temporarioly remove prperty descriptions from habitat_install Signed-off-by: Jeff Brimager <jbrimager@chef.io> * removing documentation changes the habitat_package and habitat_sup as well Signed-off-by: Jeff Brimager <jbrimager@chef.io> * cleaninig up commented issues Signed-off-by: Jeff Brimager <jbrimager@chef.io> * added all property descriptions back to habitat resources Signed-off-by: Jeff Brimager <jbrimager@chef.io> * corrected chefstule errros Signed-off-by: Jeff Brimager <jbrimager@chef.io> * cleaned up descriptions in habitat_install Signed-off-by: Jeff Brimager <jbrimager@chef.io> * cleaning up bad trailing spaces Signed-off-by: Jeff Brimager <jbrimager@chef.io> * fixed kitchen runlist for linux Signed-off-by: Jeff Brimager <jbrimager@chef.io> * removing habitat from package providers Signed-off-by: Jeff Brimager <jbrimager@chef.io> * cleaned up bad character in habitat install Signed-off-by: Jeff Brimager <jbrimager@chef.io> * fixed habitat_package resource Signed-off-by: Jeff Brimager <jbrimager@chef.io> * changing how habitat_package connects to its provider Signed-off-by: Jeff Brimager <jbrimager@chef.io> * converted habitat_package_provider to a resource class Signed-off-by: Jeff Brimager <jbrimager@chef.io> * chefstyle corrections made Signed-off-by: Jeff Brimager <jbrimager@chef.io> * connecting habitat_package with _provider Signed-off-by: Jeff Brimager <jbrimager@chef.io> * testing habitat_package_provider Signed-off-by: Jeff Brimager <jbrimager@chef.io> * changing resource method for habit_package_provider Signed-off-by: Jeff Brimager <jbrimager@chef.io> * more chefstyle corrections Signed-off-by: Jeff Brimager <jbrimager@chef.io> * reverted changes Signed-off-by: Jeff Brimager <jbrimager@chef.io> * correcting end statements and bad syntax Signed-off-by: Jeff Brimager <jbrimager@chef.io> * trying to alter habitat_package_provider to work as a resource Signed-off-by: Jeff Brimager <jbrimager@chef.io> * altering the methods for remove_package in habitat_provider_package Signed-off-by: Jeff Brimager <jbrimager@chef.io> * mapping exceptions to habitat package provider Signed-off-by: Jeff Brimager <jbrimager@chef.io> * habitat_package resource connected to habitat_package_provider Signed-off-by: Jeff Brimager <jbrimager@chef.io> * removed V2 hab version compare from habitat_package provider we will only support systemd moving forward Signed-off-by: Jeff Brimager <jbrimager@chef.io> * removing yesterdays changes to see if they are causing the issue with habitat_sup Signed-off-by: Jeff Brimager <jbrimager@chef.io> * reverting the habitat_package provider to previous state Signed-off-by: Jeff Brimager <jbrimager@chef.io> * removing bad test Signed-off-by: Jeff Brimager <jbrimager@chef.io> * restored the version_compare in habitat provider Signed-off-by: Jeff Brimager <jbrimager@chef.io> * correcting spellcheck issues Signed-off-by: Jeff Brimager <jbrimager@chef.io> * commiting new resources to clean branch Signed-off-by: Jeff Brimager <jbrimager@chef.io> * reworked toml_dumper resource helper to make sure all end statements were correct and it was being made available to other resource Signed-off-by: Jeff Brimager <jbrimager@chef.io> * changing implementation of toml_deumper to match how the cron_validations helper was implemented Signed-off-by: Jeff Brimager <jbrimager@chef.io> * changing implementation of toml_dumper to match how the cron_validations helper was implemented Signed-off-by: Jeff Brimager <jbrimager@chef.io> * calling toml dumper as a method Signed-off-by: Jeff Brimager <jbrimager@chef.io> * testing new method for toml_dumper helper Signed-off-by: Jeff Brimager <jbrimager@chef.io> * adding "use" statement for toml helper in habitat_config and habitat_toml Signed-off-by: Jeff Brimager <jbrimager@chef.io> * fixing relational mapping with toml_dumper Signed-off-by: Jeff Brimager <jbrimager@chef.io> * using Chef::ResourceHelper::TomlDumper as method to create toml Signed-off-by: Jeff Brimager <jbrimager@chef.io> * correcting syntax error for Chef::ResourceHelpers:: in the habitat_config and habitat_user_toml resource Signed-off-by: Jeff Brimager <jbrimager@chef.io> * adding a render helper Signed-off-by: Jeff Brimager <jbrimager@chef.io> * moved files to correct directories for render_helpers and corrected resource syntax Signed-off-by: Jeff Brimager <jbrimager@chef.io> * chefstyle corrections Signed-off-by: Jeff Brimager <jbrimager@chef.io> * removed renderhelers form chef-utils. there by mistake Signed-off-by: Jeff Brimager <jbrimager@chef.io> * corrected class for render helpers Signed-off-by: Jeff Brimager <jbrimager@chef.io> * fixed broken end statement in chef/dsl/toml.rb Signed-off-by: Jeff Brimager <jbrimager@chef.io> * corrected render helper class syntax line 23. was set as a module ; Signed-off-by: Jeff Brimager <jbrimager@chef.io> * corrected dsl helper mapping for render_helpers in spec tests Signed-off-by: Jeff Brimager <jbrimager@chef.io> * wiring chef-utls/internal to render_helpers Signed-off-by: Jeff Brimager <jbrimager@chef.io> * remove "include internal" from render_helpers Signed-off-by: Jeff Brimager <jbrimager@chef.io> * removed old helper from habitat_config and habitat_user_toml resources Signed-off-by: Jeff Brimager <jbrimager@chef.io> * removed old helper from habitat_config and habitat_user_toml resources Signed-off-by: Jeff Brimager <jbrimager@chef.io> * chefstyle corrections on render_helpers_spec Signed-off-by: Jeff Brimager <jbrimager@chef.io> * chefstyle corrections on chef-utils/lib/chef-utils.rb Signed-off-by: Jeff Brimager <jbrimager@chef.io> * added all documentation to resources Signed-off-by: Jeff Brimager <jbrimager@chef.io> * cleaned up render_helper_spec.rb Signed-off-by: Jeff Brimager <jbrimager@chef.io> * cleaning up spellcheck errors Signed-off-by: Jeff Brimager <jbrimager@chef.io> * removing unused variable from habitat package provider Signed-off-by: Jeff Brimager <jbrimager@chef.io> * correecting bad syntaxt in habitat_package Signed-off-by: Jeff Brimager <jbrimager@chef.io> * temporarioly remove prperty descriptions from habitat_install Signed-off-by: Jeff Brimager <jbrimager@chef.io> * removing documentation changes the habitat_package and habitat_sup as well Signed-off-by: Jeff Brimager <jbrimager@chef.io> * cleaninig up commented issues Signed-off-by: Jeff Brimager <jbrimager@chef.io> * added all property descriptions back to habitat resources Signed-off-by: Jeff Brimager <jbrimager@chef.io> * corrected chefstule errros Signed-off-by: Jeff Brimager <jbrimager@chef.io> * cleaned up descriptions in habitat_install Signed-off-by: Jeff Brimager <jbrimager@chef.io> * cleaning up bad trailing spaces Signed-off-by: Jeff Brimager <jbrimager@chef.io> * fixed kitchen runlist for linux Signed-off-by: Jeff Brimager <jbrimager@chef.io> * removing habitat from package providers Signed-off-by: Jeff Brimager <jbrimager@chef.io> * cleaned up bad character in habitat install Signed-off-by: Jeff Brimager <jbrimager@chef.io> * fixed habitat_package resource Signed-off-by: Jeff Brimager <jbrimager@chef.io> * changing how habitat_package connects to its provider Signed-off-by: Jeff Brimager <jbrimager@chef.io> * converted habitat_package_provider to a resource class Signed-off-by: Jeff Brimager <jbrimager@chef.io> * chefstyle corrections made Signed-off-by: Jeff Brimager <jbrimager@chef.io> * connecting habitat_package with _provider Signed-off-by: Jeff Brimager <jbrimager@chef.io> * testing habitat_package_provider Signed-off-by: Jeff Brimager <jbrimager@chef.io> * changing resource method for habit_package_provider Signed-off-by: Jeff Brimager <jbrimager@chef.io> * more chefstyle corrections Signed-off-by: Jeff Brimager <jbrimager@chef.io> * reverted changes Signed-off-by: Jeff Brimager <jbrimager@chef.io> * correcting end statements and bad syntax Signed-off-by: Jeff Brimager <jbrimager@chef.io> * trying to alter habitat_package_provider to work as a resource Signed-off-by: Jeff Brimager <jbrimager@chef.io> * altering the methods for remove_package in habitat_provider_package Signed-off-by: Jeff Brimager <jbrimager@chef.io> * mapping exceptions to habitat package provider Signed-off-by: Jeff Brimager <jbrimager@chef.io> * habitat_package resource connected to habitat_package_provider Signed-off-by: Jeff Brimager <jbrimager@chef.io> * removed V2 hab version compare from habitat_package provider we will only support systemd moving forward Signed-off-by: Jeff Brimager <jbrimager@chef.io> * removing yesterdays changes to see if they are causing the issue with habitat_sup Signed-off-by: Jeff Brimager <jbrimager@chef.io> * reverting the habitat_package provider to previous state Signed-off-by: Jeff Brimager <jbrimager@chef.io> * removing bad test Signed-off-by: Jeff Brimager <jbrimager@chef.io> * restored the version_compare in habitat provider Signed-off-by: Jeff Brimager <jbrimager@chef.io> * correcting spellcheck issues Signed-off-by: Jeff Brimager <jbrimager@chef.io> * adding documentation to habitat resources Signed-off-by: Jeff Brimager <jbrimager@chef.io> * correcting doc format in habitat_sup Signed-off-by: Jeff Brimager <jbrimager@chef.io> * cleaned up descrtipstions and added proper tagging for doc generation Signed-off-by: Jeff Brimager <jbrimager@chef.io> * removed require_relative "toml" from render helpers Signed-off-by: Jeff Brimager <jbrimager@chef.io> * misunderstanding in refactor. code added back for require_relative Signed-off-by: Jeff Brimager <jbrimager@chef.io> * misunderstanding in refactor. code added back for require_relative Signed-off-by: Jeff Brimager <jbrimager@chef.io> * added use_multipackage_api to habitat_package_provider Signed-off-by: Jeff Brimager <jbrimager@chef.io> * added guard to make sure habitat linux was only tested on systemd capable machines Signed-off-by: Jeff Brimager <jbrimager@chef.io> * extended timeout loops on _habitat_services kitchen tests Signed-off-by: Jeff Brimager <jbrimager@chef.io> * removed unnecessary tesys Signed-off-by: Jeff Brimager <jbrimager@chef.io> * removed deprecated test method for habitat package version_compare Signed-off-by: Jeff Brimager <jbrimager@chef.io> * removing private tag in the habitat package provider Signed-off-by: Jeff Brimager <jbrimager@chef.io> * more corrections to the habitat_package provider for testing Signed-off-by: Jeff Brimager <jbrimager@chef.io> * removed bad line in habitat package provider Signed-off-by: Jeff Brimager <jbrimager@chef.io> * corrected punctuation on all habitat descriptions Signed-off-by: Jeff Brimager <jbrimager@chef.io> * adding notes to tk runs to explain why service loads are looped Signed-off-by: Jeff Brimager <jbrimager@chef.io> * correcting spellcheck errors Signed-off-by: Jeff Brimager <jbrimager@chef.io> * merging master Signed-off-by: Jeff Brimager <jbrimager@chef.io>
* Add windows_defender and windows_defender_exclusion resourcesTim Smith2021-06-131-1/+3
| | | | | | These were originally written for the desktop-config cookbook. Signed-off-by: Tim Smith <tsmith@chef.io>
* Creating the `inspec_waiver_file_entry` resource for managing and formatting ↵Davin Taddeo2021-05-081-0/+1
| | | | | a waiver file (#10098) Signed-off-by: Tim Smith <tsmith@chef.io>
* Fully remove user resource support for macOS < 10.14Tim Smith2021-02-161-1/+0
| | | | | | This builds on the removal of macOS 10.13 from the build matrix in https://github.com/chef/chef/pull/10680. With 10.14+ required for Chef packages we can safely remove the dscl_user resource and just assume 10.14+ when creating users. Signed-off-by: Tim Smith <tsmith@chef.io>
* chef_client_config resourceTim Smith2020-10-121-0/+1
| | | | | | Initial stab at a chef_client_config resource that will allow people to easily write out a client.rb. This isn't meant to cover every single use case, but instead to provide a simple resource that works for 99% of users. Signed-off-by: Tim Smith <tsmith@chef.io>
* Add initial take at chef_client_launchdTim Smith2020-08-251-1/+2
| | | | | | | The good: We have a resource to configure chef-client to run as a service on macos The bad: Launchd will stop the service if a reconfigure is necessary and it will not start back up. This is a known issue and it exists in the chef-client cookbook as well, but we need to solve it by forked off the chef-client process before we restart the launchd agent. Signed-off-by: Tim Smith <tsmith@chef.io>
* Add new chef_client_trusted_certificate resourceTim Smith2020-08-191-0/+1
| | | | | | | | This is a pretty simple resource for something that users can certainly do on their own right now, but most people don't even realize is an option. Giving it a dedicated resource exposes the functionality better and just makes it that much easier to write a simple cross platform cookbook that involves configuring the client. I'm not a huge fan of having to provide the certificate as a string, but I didn't want to add yet another place where we allow string values, or URI. They all have slightly different APIs and we need to just do it via a mixin or something. This can certainly move that direction in the future, but for this solves a real problem today. Signed-off-by: Tim Smith <tsmith@chef.io>
* Merge branch 'master' of github.com:chef/chef into windows_firewall_profileDavin Taddeo2020-06-201-2/+2
|\
| * Merge pull request #10001 from chef/cron_cleanupTim Smith2020-06-151-2/+2
| |\ | | | | | | Cron and Cron_d resource weekday property fixes
| | * Added cron_shared partial.antima-gupta2020-06-101-2/+2
| | | | | | | | | | | | | | | | | | | | | Fixed provider cron spec failure. Moved cron and cron resource into the lib/chef/resource/cron directory. Signed-off-by: antima-gupta <agupta@msystechnologies.com>
* | | Merge branch 'master' of github.com:chef/chef into windows_firewall_profileDavin Taddeo2020-06-151-0/+1
|\ \ \ | |/ / | | | | | | Signed-off-by: Davin Taddeo <davin@chef.io>
| * | add windows_audit_policy to the resource list.Davin Taddeo2020-06-101-0/+1
| |/ | | | | | | Signed-off-by: Davin Taddeo <davin@chef.io>
* | push windows_firewall_profile resource to open a PR with.Davin Taddeo2020-06-151-0/+1
|/ | | | Signed-off-by: Davin Taddeo <davin@chef.io>
* Adds the homebrew_update resourceDan Webb2020-05-211-0/+1
| | | | Signed-off-by: Dan Webb <dan.webb@damacus.io>
* Chef-16 git provider fixesLamont Granquist2020-04-231-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | The git provider now no longer checks out to a "deploy" branch by default and now checks out to the branch (with a remote upstream) or else checks out to a detatched head. The prior behavior can be restored by using "checkout branch 'deploy'". This also removes the SCM resource base class and replaces it with a resource partial and does some internal reorganization. It also introduces the RecipeDSLHelper for better functional tests and cleans up the functional tests of the git provider. Properties that were only ever implemented on the git provider were removed from the subversion provider where they had been inherited from the base class incorrectly. Some additional env var handling was added to the subversion handler in the process of sorting out the common properties, including HOME handling for alternative users. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* 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>
* Add the plist resource from the macos cookbookTim Smith2020-04-101-0/+1
| | | | | | | | | This is a very useful base resource for mac systems that allows us to write additional resources for managing macs. I've migrated their library into the resource itself to make it a single self-contained unit. Signed-off-by: Tim Smith <tsmith@chef.io>
* Add chef_client_systemd_timer resourceTim Smith2020-04-081-0/+1
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Add chef_client_windows_task resource from chef-client cookbookchef_client_windows_taskTim Smith2020-03-241-0/+1
| | | | | | Allow setting up chef-client to run as a scheduled task out of the box. Signed-off-by: Tim Smith <tsmith@chef.io>
* Add chef_client_cron resource from chef-client cookbookTim Smith2020-03-231-0/+1
| | | | | | | Add the chef_client_cron resource so users can manage chef-client as a cron job out of the box. Signed-off-by: Tim Smith <tsmith@chef.io>
* Add user_ulimit resource from the ulimit cookbookTim Smith2020-03-161-0/+1
| | | | | | This is a really handy resource for modifying ulimits on a system. Signed-off-by: Tim Smith <tsmith@chef.io>
* Add alternatives resource for LinuxTim Smith2020-03-121-0/+1
| | | | | | This comes from https://github.com/vkhatri/chef-alternatives Signed-off-by: Tim Smith <tsmith@chef.io>
* Add windows_security_policy resourceNAshwini2020-03-051-0/+1
| | | | Signed-off-by: NAshwini <ashwini.nehate@msystechnologies.com>
* MSYS-1230 Migrating windows_user_privilege resource from windows cookbookVasu11052020-02-231-0/+1
| | | | Signed-off-by: Vasu1105 <vasundhara.jagdale@msystechnologies.com>
* Add chef_vault_secret resource from chef-vault cookbookTim Smith2020-02-121-0/+1
| | | | | | Move this common resource into Chef itself to avoid the need to include this cookbook. Signed-off-by: Tim Smith <tsmith@chef.io>
* Add notify_group resourceLamont Granquist2020-02-061-1/+2
| | | | | | | This can be used to replace the abuse of the log resource for grouping notifications. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Add new chef_sleep resourceTim Smith2019-11-081-0/+1
| | | | | | | | | | | We highly recommend you never use this, but there's times when you 100% need to have the client sleep for a period of time after some work. Example: windows_service will start a service and the OS will say that it's "started" when it's not. Before doing additional work that relies on the service being started you may need to sleep. This would be a good time to notify on the restart or start action. Signed-off-by: Tim Smith <tsmith@chef.io>
* Add mac_user resource that is compatible with macOS >= 10.14Ryan Cragun2019-07-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide a user resource that is compatible with default TCC restrictions that were introduced in macOS 10.14. Changes: * This resource and the corresponding provider have been modified to work with default macOS TCC policies. Direct access to user binary plists are no longer permitted by default, thus we've chosen to use use newer methods of creating, modifying and removing users. * Due to the tooling required by the provider this provider is only suitable for use on macOS >= 10.14. Support for older platforms has been removed. New Features: * Primary group management is now included. * 'admin' is now a boolean property that configures a user to an admin. * 'admin_username' and 'admin_password' are new properties that define the admin user credentials required for toggling SecureToken for an exiting user. The 'admin_username' must correspond to a system admin with SecureToken enabled in order to toggle SecureToken. * 'secure_token' is a boolean property that sets the desired state for SecureToken. SecureToken token is required for FileVault full disk encryption. Signed-off-by: Ryan Cragun <ryan@chef.io>
* (GH-8580) Add ability to toggle Chocolatey featureGary Ewan Park2019-05-271-0/+1
| | | | | | | | | | | Add the ability to enable and disable a named Chocolatey feature by creating a new Chef resource named chocolatey_feature. This accepts a single property either from feature_name or directly from name attribute then, based on the defined action, will either enable or disable that feature. Resource inspects the current state of the chocolatey.config in order to decide whether a change is required or not. Signed-off-by: Gary Ewan Park <gep13@gep13.co.uk>
* Convert require to require_relativeLamont Granquist2019-05-081-137/+137
| | | | | | | 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>
* Add a new archive_file resource from the libarchive cookbookTim Smith2019-04-151-0/+1
| | | | | | This adds the archive_file resource from the libarchive cookbook. I've updated the property names in that cookbook to allow us to add a :create action later on. This code matches the code in the cookbook nearly 100%. Signed-off-by: Tim Smith <tsmith@chef.io>
* Merge pull request #8212 from chef/windows_uacTim Smith2019-02-061-1/+2
|\ | | | | Add windows_uac resource
| * Add windows_uac resourcewindows_uacTim Smith2019-02-051-1/+2
| | | | | | | | | | | | | | | | This comes from the windows_uac cookbook. https://supermarket.chef.io/cookbooks/windows_uac Signed-off-by: Tim Smith <tsmith@chef.io>
* | Add windows_dfs and windows_dns resourcesTim Smith2019-02-021-0/+5
|/ | | | | | These are ported over from the windows_dns and windows_dfs cookbooks. Signed-off-by: Tim Smith <tsmith@chef.io>
* initial suppport for snap packagesS.Cavallo2018-11-281-0/+1
| | | | Signed-off-by: S.Cavallo <smcavallo@hotmail.com>
* wire up windows_firewall_ruleTor Magnus Rakvåg2018-11-011-0/+1
| | | | Signed-off-by: Tor Magnus Rakvåg <tor.magnus@outlook.com>
* Add windows_certificate and windows_share resourcesTim Smith2018-10-291-0/+2
| | | | | | Move two additional resources over from the windows cookbook. With these moved we're pretty close to fully deprecating the windows cookbook. Signed-off-by: Tim Smith <tsmith@chef.io>
* Add the timezone resource from the timezone_lwrp cookbookTim Smith2018-10-091-0/+1
| | | | | | Adding this resource to core Chef with permission from @dragonsmith Signed-off-by: Tim Smith <tsmith@chef.io>
* Merge branch 'master' into feature/windows_ad_joinStuart Preston2018-09-141-0/+1
|\
| * add locale resource to chefVincent AUBERT2018-09-111-0/+1
| | | | | | | | Signed-off-by: Vincent AUBERT <vincentaubert88@gmail.com>
* | Merge branch 'master' of https://github.com/chef/chef into ↵Derek Groh2018-09-041-1/+8
|\ \ | |/ | | | | feature/windows_ad_join
| * Add openssl_x509_crl resourceTim Smith2018-08-241-0/+1
| | | | | | | | | | | | This is another great resource added to the openssl cookbook by @juju482 at Institut National de l'Audiovisuel Signed-off-by: Tim Smith <tsmith@chef.io>
| * Add new openssl_* resourcesTim Smith2018-08-141-0/+4
| | | | | | | | | | | | | | | | | | openssl_ec_private_key openssl_ec_public_key openssl_x509_certificate openssl_x509_request Signed-off-by: Tim Smith <tsmith@chef.io>
| * Add cron_d and cron_access resources from the cron cookbookTim Smith2018-08-131-1/+3
| | | | | | | | | | | | Cron_d was the #1 requested resource that we already had written. Everyone uses it and we should ship it. It's not a replacement for the existing cron cookbook, but just a different way of managing cron. If people want to manage the whole file or individual snippets we'll give them the option, just as we've always done by having the core resource and this resource. Signed-off-by: Tim Smith <tsmith@chef.io>
* | move require spec to .\lib\chef\resources.rbDerek Groh2018-08-241-0/+1
|/ | | | Signed-off-by: Derek Groh <derekgroh@github.io>
* Add chocolatey_config and chocolatey_source resourcesTim Smith2018-06-261-0/+2
| | | | | | Allow a user to fully manage chocolatey and get it setup for airgapped environments using chef out of the box. Signed-off-by: Tim Smith <tsmith@chef.io>