11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/vagrant-ignition/action/setup_ignition.rb', line 11
def call(env)
@env = env
if env[:machine].config.ignition.enabled == false
@app.call(env)
return
end
config_path = env[:machine].config.ignition.path
config_vmdk = env[:machine].config.ignition.config_vmdk
config_img = env[:machine].config.ignition.config_img
hostname = env[:machine].config.ignition.hostname
ip = env[:machine].config.ignition.ip
vmdk_gen(config_path, config_vmdk, config_img, hostname, ip, env)
env[:machine].ui.info "Configuring Ignition Config Drive"
env[:machine].provider.driver.execute("storageattach", "#{env[:machine].id}", "--storagectl", "IDE Controller", "--device", "0", "--port", "1", "--type", "hdd", "--medium", "#{config_vmdk}")
@app.call(env)
end
|