From 306bcd576917a5b40a827552922f4ca96437726b Mon Sep 17 00:00:00 2001 From: Greg Barker Date: Wed, 25 Feb 2015 23:58:56 +0000 Subject: [PATCH] Fixed #35 Added note about lazy attribute evaluation --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index f640467..4cd7fda 100644 --- a/README.md +++ b/README.md @@ -204,6 +204,18 @@ certificate_manage "mail" do end ``` +##### Setting FQDN during the converge? + +If you are updating the FQDN of the node during converge, be sure to use [lazy attribute evaluation](https://docs.chef.io/resource_common.html#lazy-attribute-evaluation) when using the LWRP to ensure ```node['fqdn']``` refers to the updated value. + +```ruby +certificate_manage "wildcard" do + cert_file lazy { "#{node['fqdn']}.pem" } + key_file lazy { "#{node['fqdn']}.key" } + chain_file lazy { "#{node['fqdn']}-bundle.crt" } +end +``` + License and Author ------------------