diff options
author | elijah <elijah@riseup.net> | 2016-05-26 11:54:12 -0700 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2016-05-26 11:54:12 -0700 |
commit | 470ddd6f461d5659b746724864f16aaf206532e2 (patch) | |
tree | 5ff6858acd07d5aeddf946b762f14d301dc9a822 | |
parent | 74e52e2a225b9f8ce57b4afb2d104b770102fcd2 (diff) |
ensure that local nodes get the 'local' environment.
-rw-r--r-- | lib/leap_cli/config/manager.rb | 16 |
1 files changed, 10 insertions, 6 deletions
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 # |