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

Possiblity of having Chef Node Name different from Hostname #17

Open
skarungan opened this issue May 5, 2017 · 6 comments
Open

Possiblity of having Chef Node Name different from Hostname #17

skarungan opened this issue May 5, 2017 · 6 comments
Labels

Comments

@skarungan
Copy link

machine "testubuntu03" do
end

This create nodename as testubuntu03 in chef. Is it possible to specify chef's node name while provisioning a machine (different from hostname).

@juanxhos
Copy link

Did this happen on windows ?

@johnsoja40
Copy link

This is already available through use of the 'vsphere_name' property.

@jjasghar
Copy link

Should we make this more clear in the README? I'd love a PR with suggestions.

@rperez31
Copy link

yes, this is for a windows machine. we want chef to name the machine with fqdn. for example:
machine "testmachine01" do
end
vs
machine "testmachine01.local" do
end

@petracvv
Copy link

@johnsoja40 I don't think that property exists. I could only find references to it in the kitchen driver. All the code seems to use machine_spec.name when creating and referencing the VM.

@hrmmmwhynot
Copy link

don't think you can without modifying some code... I believe it is here that preps the chef entry for saving.
https://github.com/chef/chef-provisioning/blob/master/lib/chef/provider/machine.rb
line 188

  @machine_spec = chef_managed_entry_store.new_entry(:machine, new_resource.name, json)

The new_resource.name is a property inherited all the way from https://github.com/chef/chef/blob/master/lib/chef/resource.rb
which is what you get when you pass

   machine "machine_name" do
       something
   end

Just a guess after looking...

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

No branches or pull requests

7 participants