aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/leap_cli/commands/node.rb2
-rw-r--r--lib/leap_cli/config/manager.rb1
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/leap_cli/commands/node.rb b/lib/leap_cli/commands/node.rb
index 87718e9..6a60c45 100644
--- a/lib/leap_cli/commands/node.rb
+++ b/lib/leap_cli/commands/node.rb
@@ -22,7 +22,7 @@ module LeapCli; module Commands
# argument sanity checks
name = args.first
assert! name, 'No <node-name> specified.'
- assert! name =~ /^[0-9a-z_-]+$/, "illegal characters used in node name '#{name}'"
+ assert! name =~ /^[0-9a-z-]+$/, "illegal characters used in node name '#{name}'"
assert_files_missing! [:node_config, node.name]
# create and seed new node
diff --git a/lib/leap_cli/config/manager.rb b/lib/leap_cli/config/manager.rb
index adda9bd..6702fc4 100644
--- a/lib/leap_cli/config/manager.rb
+++ b/lib/leap_cli/config/manager.rb
@@ -43,6 +43,7 @@ module LeapCli
@common.inherit_from! base_common
@provider.inherit_from! base_provider
@nodes.each do |name, node|
+ Util::assert! name =~ /^[0-9a-z-]+$/, "Illegal character(s) used in node name '#{name}'"
@nodes[name] = apply_inheritance(node)
end