From 470ddd6f461d5659b746724864f16aaf206532e2 Mon Sep 17 00:00:00 2001 From: elijah Date: Thu, 26 May 2016 11:54:12 -0700 Subject: ensure that local nodes get the 'local' environment. --- lib/leap_cli/config/manager.rb | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'lib/leap_cli/config/manager.rb') diff --git a/lib/leap_cli/config/manager.rb b/lib/leap_cli/config/manager.rb index ecc59f3..5af046f 100644 --- a/lib/leap_cli/config/manager.rb +++ b/lib/leap_cli/config/manager.rb @@ -352,15 +352,19 @@ module LeapCli # determine the node's properties. # def guess_node_env(node) - environment = self.env(default_environment) - if node['tags'] - node['tags'].to_a.each do |tag| - if self.environment_names.include?(tag) - environment = self.env(tag) + if node.vagrant? + return self.env("local") + else + environment = self.env(default_environment) + if node['tags'] + node['tags'].to_a.each do |tag| + if self.environment_names.include?(tag) + environment = self.env(tag) + end end end + return environment end - return environment end # -- cgit v1.2.3