Skip to content

Commit

Permalink
Fixed #35 Added note about lazy attribute evaluation
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg Barker committed Feb 25, 2015
1 parent 16fadb8 commit 306bcd5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
------------------

Expand Down

0 comments on commit 306bcd5

Please sign in to comment.