Support #8969
openSend the host['ip'] variable to customization spec
Description
Hey all .
I've been added ‘customization_spec’ in this file : /usr/share/foreman/app/models/compute_resources/foreman/model/vmware.rb to send custom ip , hostname to Vmware clone ( from template ) .
With static details like :
customization_spec' => {
'domain' => "mobimate.local",
'hostname' => args[:name].split('.',2)[0],
'ipsettings' => {
'ip' => “xxx.xxx.xxx.xxx",
'gateway' => [“xxx.xxx.xxx.xxx"],
'subnetMask' => “xxx.xxx.xxx.xxx”,
Everything is working fine.
I would like to know where is the View that we can get the IP that foreman automatically generated
I need to passed the ip to the ip variable in the customization_spec.
Thanks ,
Amit Daniel
Updated by Ohad Levy over 9 years ago
- Priority changed from High to Normal
normally, its host.ip? BTW: the mailing list is much better medium for this kind of queries.
Updated by Amit Daniel over 9 years ago
Hey Ohad ,
Thanks for your answer .
Still i can't get the host.ip.
'domain' => "mobimate.local",
'hostname' => args[:name].split('.',2)[0],
'ipsettings' => { * 'ip' => host.ip ,
- 'gateway' => ["xxx"],
'subnetMask' => "xxx",
},
},
are you sure in the ip i just need to add host.ip ?
Thanks ,
Amit