summaryrefslogtreecommitdiff
path: root/lib/chef/resources.rb
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Merge pull request #7354 from Intility/powershell_package_sourceStuart Preston2018-06-201-0/+1
|\ | | | | Add powershell_package_source resource
| * wire up the resourceTor Magnus Rakvåg2018-06-081-0/+1
| | | | | | | | Signed-off-by: Tor Magnus Rakvåg <tm@intility.no>
* | Add kernel_module resource from the kernel_module cookbookTim Smith2018-06-111-0/+1
| | | | | | | | | | | | Copied from the 1.1.1 release. Signed-off-by: Tim Smith <tsmith@chef.io>
* | Add ssh_known_hosts_entry from ssh_known_hosts cookbookTim Smith2018-06-111-0/+1
|/ | | | | | Port this from the 6.1 release of the cookbook Signed-off-by: Tim Smith <tsmith@chef.io>
* Add swap_file resource form the swap cookbookTim Smith2018-03-231-0/+1
| | | | | | Copied as-is from the cookbook Signed-off-by: Tim Smith <tsmith@chef.io>
* Rename to windows_ad_joinTim Smith2018-03-221-1/+1
| | | | | | This allows us to have windows_ad_* in the future Signed-off-by: Tim Smith <tsmith@chef.io>
* Add windows_adjoin resourceTim Smith2018-03-221-0/+1
| | | | | | Copied with permission from John Snow's win_ad cookbook. It's been reworked to not mess with dns servers and use powershell_out + sensitive. Some of those changes are getting pushed upstream, but the name is different and there's no expectation of compatibility here. Signed-off-by: Tim Smith <tsmith@chef.io>
* Rename systctl_param to sysctlTim Smith2018-03-211-1/+1
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>