Mentions légales du service

Skip to content
Snippets Groups Projects

custom variables

Closed Alexandre MERLIN requested to merge env_variable into arch
Files
9
+ 9
1
@@ -45,6 +45,7 @@ class KadeployClient < ClientWorkflow
:reboot_classical_timeout => nil,
:reboot_kexec_timeout => nil,
:vlan => nil,
:custom_variables => {},
:secure => false,
}
)
@@ -72,8 +73,10 @@ class KadeployClient < ClientWorkflow
parse_pxe_profile(opt, options)
parse_pxe_pattern(opt, options)
parse_pxe_files(opt, options)
parse_custom_variables(opt, options)
parse_env_version(opt, options)
parse_env_arch(opt, options)
opt.separator ""
opt.separator "Advanced options:"
add_opt(opt, "--no-kexec", "Disable kexec from the deployment kernel to the deployed environment") {
@@ -135,7 +138,11 @@ class KadeployClient < ClientWorkflow
params[:environment] = {
:kind => options[:env_kind],
}
unless options[:custom_variables].empty?
server_env_vars = get2(options, '/info')['vars']
incorrect_custom_variables = options[:custom_variables].keys & server_env_vars.map{|x| x.gsub(/^KADEPLOY_/,'') }
error("You cannot overwrite Kadeploy variables: #{incorrect_custom_variables.join(', ')}.") unless incorrect_custom_variables.empty?
end
params[:deploy_partition] = options[:deploy_part] if options[:deploy_part]
params[:block_device] = options[:block_device] if options[:block_device]
params[:boot_partition] = options[:boot_part] if options[:boot_part]
@@ -147,6 +154,7 @@ class KadeployClient < ClientWorkflow
params[:always_trust_env] = options[:always_trust_env] if options[:always_trust_env]
params[:disable_bootloader_install] = options[:disable_bootloader_install] if options[:disable_bootloader_install]
params[:disable_disk_partitioning] = options[:disable_disk_partitioning] if options[:disable_disk_partitioning]
params[:custom_variables] = options[:custom_variables]
if options[:pxe_profile]
params[:pxe] = {}
params[:pxe][:profile] = options[:pxe_profile]
Loading