summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-10-12 16:31:58 -0700
committerTim Smith <tsmith84@gmail.com>2020-10-12 16:31:58 -0700
commit6fbbd9c34314bc5c9a40b842187c07e5d7d0ca49 (patch)
treeddb9d936f5b5f5c54e42442fafb25f4e6a6b38a2
parented8b8c02e092c7b242526ea89d96141aa8305643 (diff)
downloadchef-6fbbd9c34314bc5c9a40b842187c07e5d7d0ca49.tar.gz
Add examples
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--lib/chef/resource/chef_client_config.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/chef/resource/chef_client_config.rb b/lib/chef/resource/chef_client_config.rb
index a9df7448fd..9a99a7cb1d 100644
--- a/lib/chef/resource/chef_client_config.rb
+++ b/lib/chef/resource/chef_client_config.rb
@@ -27,6 +27,26 @@ class Chef
description "Use the **chef_client_config** resource to create a client.rb file in the #{ChefUtils::Dist::Infra::PRODUCT} configuration directory. See the [client.rb docs](https://docs.chef.io/config_rb_client/) for more details on options available in the client.rb configuration file."
introduced "16.6"
examples <<~DOC
+ **Bare minimum #{ChefUtils::Dist::Infra::PRODUCT} client.rb**:
+
+ ```ruby
+ chef_client_config 'Create client.rb' do
+ chef_server_url 'https://chef.example.dmz'
+ end
+ ```
+
+ **More complex #{ChefUtils::Dist::Infra::PRODUCT} client.rb**:
+
+ ```ruby
+ chef_client_config 'Create client.rb' do
+ chef_server_url 'https://chef.example.dmz'
+ log_level :info
+ log_location :syslog
+ http_proxy 'proxy.example.dmz'
+ https_proxy 'proxy.example.dmz'
+ no_proxy %w(internal.example.dmz)
+ end
+ ```
DOC
# @todo policy_file or policy_group being set requires the other to be set so enforce that.