chef-provisioning-vsphere
chef-provisioning-vsphere copied to clipboard
Possiblity of having Chef Node Name different from Hostname
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).
Did this happen on windows ?
This is already available through use of the 'vsphere_name' property.
Should we make this more clear in the README? I'd love a PR with suggestions.
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
@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.
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...