Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I set fqdn for chef nodes?

I have several servers set up with a custom internal local domain - x.local. So I have servers s1.x.local, etc. My knife reports the fqdn as s1.domain.com. Can I change that without changing the names the servers think they have? Or do I need to actually change the server names? Thanks.

like image 721
nroose Avatar asked Feb 11 '13 21:02

nroose


1 Answers

You can, but it will not stay set to the value you give it.

The FQDN attribute is what is known as an automatic attribute in Chef. It is set by Ohai each and every time Ohai runs.

Therefore, while you can change the value of the FQDN attribute, the next time Ohai runs, it will set it back to be the value returned by hostname --fqdn.

Therefore, as noted above, if you want to change the FQDN attribute permanently, you will need to change the hostname.

like image 109
Jordan Dea-Mattson Avatar answered Nov 13 '22 06:11

Jordan Dea-Mattson