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

Using hostname and ipaddress cookbooks together #25

Open
kingdonb opened this issue Jun 17, 2014 · 2 comments
Open

Using hostname and ipaddress cookbooks together #25

kingdonb opened this issue Jun 17, 2014 · 2 comments

Comments

@kingdonb
Copy link

I set a hostname using set_fqdn and alone, that works. I setup an interfaces file using harryyeh/chef-ipaddress and that works. But try to do both in the same cookbook, to a system that currently has some other hostname set...

This fails because the data bag in servers has an id that doesn't match the current hostname, even if you list ipaddress after hostname in the run_list, those things are apparently checked at parse time, and the hostname hasn't been set yet. Haven't found any workaround other than manually setting hostname with sudo hostname on the host before trying the cookbook.

Not sure if this is similar to #17 or not. Reporting it here, since @harryyeh 's cookbook seems to be out of maintenance and you might be using something else that you can tell me about, but maybe I should cross-post the issue there.

@noorul
Copy link

noorul commented Jan 7, 2015

I am also trying to figure out how to accomplish this use case. If you already figured this out, do you mind sharing it here?

@kingdonb
Copy link
Author

kingdonb commented Jan 7, 2015

I didn't, actually :/ I just settled on a multi stage process with one chef cookbook assuming that it knows how to set the network, and another after that does post-bootstrap stuff assuming it has already been set up correctly. If you have a better way, I am all ears!

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