Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use lazy attribute evaluation for the fqdn references #46

Closed
fletchowns opened this issue Feb 25, 2015 · 4 comments
Closed

Use lazy attribute evaluation for the fqdn references #46

fletchowns opened this issue Feb 25, 2015 · 4 comments

Comments

@fletchowns
Copy link

In order to be compatible with cookbooks that set the hostname during a converge like the system cookbook, can we change the references to node['fqdn'] to use lazy attribute evaluation? See this issue for some background info.

I had to use this the following as a workaround:

some_cert = certificate_manage "wildcard" do
  cert_file lazy { "#{node['fqdn']}.pem" }
  key_file lazy { "#{node['fqdn']}.key" }
  chain_file lazy { "#{node['fqdn']}-bundle.crt" }
end
@fletchowns
Copy link
Author

This would also fix issue #35.

@atomic-penguin
Copy link
Contributor

I am hesitant to fix something in the LWRP which you can work around when calling the resource.

This lazy evaluation seems like something that is probably not widely needed by most people using the cookbook. It is also a change that could impact compatibility with older versions of Chef.

@fletchowns
Copy link
Author

I ran into the issue pretty quickly as a newcomer to chef, thought it might be helpful for others. Didn't realize there's a risk of impacting compatibility with older versions of Chef. Maybe just #35 then?

@atomic-penguin
Copy link
Contributor

Yeah, a documentation update would be apropos. Care to draft it and send a pull request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants