From aa809b25ed174f3690c32b22503064d3eee98d41 Mon Sep 17 00:00:00 2001 From: hoatle Date: Thu, 19 Jul 2018 16:01:31 +0700 Subject: [PATCH] @ #277 | add autostart config implementation for node --- Vagrantfile | 4 +++- config_default.yaml | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Vagrantfile b/Vagrantfile index f0caf997..d46028da 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -47,7 +47,9 @@ end Vagrant.configure("2") do |config| settings["nodes"].each do |node_config| $logger.debug("node_config: #{node_config}") - config.vm.define node_config["name"], primary: node_config["primary"] ||= false do |node| + primary = node_config["primary"] ||= false + autostart = node_config["autostart"] === false ? false : true + config.vm.define node_config["name"], primary: primary, autostart: autostart do |node| # node settings here end end diff --git a/config_default.yaml b/config_default.yaml index ce8450ab..6be34f59 100644 --- a/config_default.yaml +++ b/config_default.yaml @@ -91,6 +91,7 @@ nodes: vm: hostname: "#{NODE_HOSTNAME_PREFIX}-1.local" - name: "#{node_name_prefix}-2" + autostart: false vm: hostname: "#{NODE_HOSTNAME_PREFIX}-2.local"