Skip to content

Commit

Permalink
added write provider file
Browse files Browse the repository at this point in the history
  • Loading branch information
jadilet committed Oct 12, 2018
1 parent f8018ae commit 4c987c4
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion lib/vagrant-subutai/packer/subutai_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,14 @@ module SubutaiConfig
# Configuration parameters below have not been implemented
SUBUTAI_DESKTOP: false, # install desktop with tray and p2p client
SUBUTAI_MAN_TMPL: nil, # provision alternative management template
APT_PROXY_URL: nil # configure apt proxy URL
APT_PROXY_URL: nil, # configure apt proxy URL

# provider with value
hyper_v: 'hyperv',
parallels: 'parallels',
virtualbox: 'virtualbox',
libvirt: 'libvirt',
vmware: 'vmware_desktop'
}

# User provided configuration settings
Expand Down Expand Up @@ -377,6 +384,13 @@ def self.load_config(cmd, provider)
load_config_file(conf_file) if File.exist?(conf_file)
load_generated

# Write empty file with name provider
# ControlCenter uses for checking provider of peer
unless File.exist?(File.join(PARENT_DIR, @defaults[@provider]))
file = File.new(File.join(PARENT_DIR, @defaults[@provider]), 'w')
file.close
end

# Load overrides from the environment, and generated configurations
ENV.each do |key, value|
put(key.to_sym, value, false) if USER_PARAMETERS.include? key.to_sym
Expand Down

0 comments on commit 4c987c4

Please sign in to comment.