aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2014-03-08 16:09:39 -0800
committerelijah <elijah@riseup.net>2014-03-08 16:09:39 -0800
commitf041c31a469a423d0a587ecccc3d4726caa630de (patch)
tree06cf85ac8c3864f96d4dd6fb67f27c9ed98ee3c8 /lib
parent8ee7d8bf8ca1dc3a4c77a6b0896aff5fa3736ad8 (diff)
downloadleap_cli-f041c31a469a423d0a587ecccc3d4726caa630de.tar.gz
leap_cli-f041c31a469a423d0a587ecccc3d4726caa630de.tar.bz2
include mx nodes in /etc/hosts of all nodes
Diffstat (limited to 'lib')
-rw-r--r--lib/leap_cli/config/macros.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/leap_cli/config/macros.rb b/lib/leap_cli/config/macros.rb
index 1402161..79f3972 100644
--- a/lib/leap_cli/config/macros.rb
+++ b/lib/leap_cli/config/macros.rb
@@ -160,7 +160,7 @@ module LeapCli; module Config
# Generates entries needed for updating /etc/hosts on a node (as a hash).
#
# Argument `nodes` can be nil or a list of nodes. If nil, only include the
- # IPs of the other nodes this @node as has encountered.
+ # IPs of the other nodes this @node as has encountered (plus all mx nodes).
#
# Also, for virtual machines, we use the local address if this @node is in
# the same location as the node in question.
@@ -172,6 +172,7 @@ module LeapCli; module Config
if nodes.nil?
if @referenced_nodes && @referenced_nodes.any?
nodes = @referenced_nodes
+ nodes = nodes.merge(nodes_like_me[:services => 'mx']) # all nodes always need to communicate with mx nodes.
end
end
return nil unless nodes