Passing multiple NICs information to custom Kickstart script


I am new to ManageIQ and is struggle on how I can get hold of information set via prov.set_nic_setting to my Kickstart script.

Over at CustomRequest in Automate, I had set up multiple NICs via:
@miq_provision.set_nic_settings( 0, {:ip_addr =>‘xx.xx.xx.xx’, :subnet_mask=>‘’, :adds_mode =>[“static”, “Static”]})
@miq_provision.set_nic_settings( 1, {:ip_addr =>‘xx.xx.xx.yy’, :subnet_mask=>‘’, :adds_mode =>[“static”, “Static”]})
@miq_provision.set_nic_settings( 2, {:ip_addr =>‘xx.xx.xx.zz’, :subnet_mask=>‘’, :adds_mode =>[“static”, “Static”]})

May I know how can I acquire the three IPs assigned to those NICs in the Kickstart script for VM provision via PXE?

The sample Kickstart customisation script takes value from Customise tab in Provisioning Dialog. Thanks!



As I’m sure you knew, within the kickstart file, anything between <% and %> is executed Ruby code. Within here, the variable ‘evm’ is global and set to the miq_provision.options hash. As such, you should be able to access your nic settings via (or something similar):

ip0 = evm[:nic_settings][0][:ip_addr]




Thanks for your help. The suggestion works!