-
Notifications
You must be signed in to change notification settings - Fork 20
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
Inconsistent value of node['fqdn'] #7
Comments
Here's what happens when I do the same thing but with on EC2 with
AWS provider branch is available here: https://github.com/fletchowns/hostname-playground/tree/system-aws |
@flaccid any thoughts on this one? |
The reason it seems inconsistent is because your Vagrantfile is setting the vm.hostname to the same short hostname you are setting with Chef. |
Running into some trouble with the latest changes. The template_test looks good now though (when using lazy attribute evaluation). I also removed setting the hostname in the Vagrantfile for this test.
I created a new branch for this test run: https://github.com/fletchowns/hostname-playground/tree/system-cookbook-rework Here's a gist of the chef run: https://gist.github.com/fletchowns/44ea27c126720f23b479 |
In this case, version 0.4.0 of the cookbook does not place a host in /etc/hosts on non Debian systems so a lookup from nsswitch does not resolve the hostname by files nor dns and thus returns unknown host (it would be ok if it was in dns/qualified). |
Created a chef repo to reproduce the issue here: https://github.com/fletchowns/hostname-playground. Just cd into the cookbooks/mycorp-chef-server directory and do a
vagrant up
.Attributes & run list is defined in the Vagrantfile:
The default recipe for mycorp-chef-server is very simple, and leverages the certificate_manage LWRP from the certificate cookbook:
The dummy_template.erb is meant to see if there is a difference between passing attributes in vs. referencing them in the template itself:
After running
vagrant up
I'm seeing the following:It seems to think that the fqdn is just 'chef', but not always (as seen in template_test). Shouldn't the fqdn be chef.mycorp.com throughout all of this?
Now after you do a subsequent
vagrant provision
on this box, I see the following:So initial converge created the file
chef.pem
but the second converge createdchef.mycorp.com.pem
. But strangely enough, the template_test contents did not change. Any idea what to make of all this?The text was updated successfully, but these errors were encountered: