summaryrefslogtreecommitdiff
path: root/lib/chef/resource
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-09-15 19:53:34 -0700
committerTim Smith <tsmith84@gmail.com>2020-09-15 19:53:34 -0700
commitc729fec1dac807f97e72928d88e80c1edc6718a0 (patch)
treec6d9ca94a8c67b2bcf1a2a0f2d84019454ea4e32 /lib/chef/resource
parent218d7b97119ceb7f3f92a6bd183030d4f6faffc2 (diff)
downloadchef-c729fec1dac807f97e72928d88e80c1edc6718a0.tar.gz
Add more openssl_dhparam examples
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef/resource')
-rw-r--r--lib/chef/resource/openssl_dhparam.rb32
1 files changed, 27 insertions, 5 deletions
diff --git a/lib/chef/resource/openssl_dhparam.rb b/lib/chef/resource/openssl_dhparam.rb
index fc9ba5ea35..3d20b1b439 100644
--- a/lib/chef/resource/openssl_dhparam.rb
+++ b/lib/chef/resource/openssl_dhparam.rb
@@ -27,15 +27,37 @@ class Chef
provides(:openssl_dhparam) { true }
- description "Use the **openssl_dhparam** resource to generate `dhparam.pem` files. If a valid dhparam.pem file is found at the specified location, no new file will be created. If a file is found at the specified location but it is not a valid dhparam file, it will be overwritten."
+ description "Use the **openssl_dhparam** resource to generate `dhparam.pem` files. If a valid `dhparam.pem` file is found at the specified location, no new file will be created. If a file is found at the specified location but it is not a valid `dhparam.pem` file, it will be overwritten."
introduced "14.0"
examples <<~DOC
- Create a 1024bit dhparam file
+ **Create a dhparam file**
```ruby
- openssl_dhparam '/etc/ssl_files/dhparam.pem' do
- key_length 1024
- action :create
+ openssl_dhparam '/etc/httpd/ssl/dhparam.pem'
+ ```
+
+ **Create a dhparam file with a specific key length**
+
+ ```ruby
+ openssl_dhparam '/etc/httpd/ssl/dhparam.pem' do
+ key_length 4096
+ end
+ ```
+
+ **Create a dhparam file with specific user/group ownership**
+
+ ```ruby
+ openssl_dhparam '/etc/httpd/ssl/dhparam.pem' do
+ owner 'www-data'
+ group 'www-data'
+ end
+ ```
+
+ **Manually specify the dhparam file path**
+
+ ```ruby
+ openssl_dhparam 'httpd_dhparam' do
+ path '/etc/httpd/ssl/dhparam.pem'
end
```
DOC