lib/vagrant-orchestrate/command/init.rb in vagrant-orchestrate-0.6.5 vs lib/vagrant-orchestrate/command/init.rb in vagrant-orchestrate-0.7.0.pre
- old
+ new
@@ -13,11 +13,11 @@
DEFAULT_WINRM_PASSWORD = "{{YOUR_WINRM_PASSWORD}}"
DEFAULT_SSH_USERNAME = "{{YOUR_SSH_USERNAME}}"
DEFAULT_SSH_PRIVATE_KEY_PATH = "{{YOUR_SSH_PRIVATE_KEY_PATH}}"
DEFAULT_PLUGINS = ["vagrant-orchestrate", "vagrant-managed-servers"]
- # rubocop:disable Metrics/AbcSize, MethodLength, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
+ # rubocop:disable MethodLength
def execute
options = {}
options[:provisioners] = []
options[:servers] = []
@@ -112,10 +112,14 @@
cfpmsg = "The path to a yaml file containing :username and :password fields to use with vagrant orchestrate"
o.on("--credentials-file-path FILEPATH", String, cfpmsg) do |file_path|
options[:creds_file_path] = file_path
end
+
+ o.on("--deployment-tracker-host host", String, "Fully qualified URL of deployment-tracker instance") do |t|
+ options[:tracker_host] = t
+ end
end
argv = parse_options(opts)
return unless argv
@@ -133,11 +137,11 @@
@env.ui.info(I18n.t("vagrant.commands.init.success"), prefix: false)
# Success, exit status 0
0
end
- # rubocop:enable Metrics/AbcSize, MethodLength, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
+ # rubocop:enable MethodLength
private
def init_puppet(options)
return unless options[:provisioners].include? "puppet"
@@ -189,11 +193,11 @@
puppet_hiera: options[:puppet_hiera], communicator: options[:communicator],
winrm_username: options[:winrm_username],
winrm_password: options[:winrm_password],
ssh_username: options[:ssh_username], ssh_password: options[:ssh_password],
ssh_private_key_path: options[:ssh_private_key_path],
- servers: options[:servers],
- environments: options[:environments], creds_prompt: options[:creds_prompt]
+ servers: options[:servers], environments: options[:environments],
+ creds_prompt: options[:creds_prompt], tracker_host: options[:tracker_host]
)
write_file("Vagrantfile", contents, options)
contents = TemplateRenderer.render(Orchestrate.source_root.join("templates/vagrant/.vagrantplugins"),
plugins: options[:plugins]