summaryrefslogtreecommitdiff
path: root/lib/leap_cli/config
diff options
context:
space:
mode:
Diffstat (limited to 'lib/leap_cli/config')
-rw-r--r--lib/leap_cli/config/filter.rb3
-rw-r--r--lib/leap_cli/config/manager.rb4
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/leap_cli/config/filter.rb b/lib/leap_cli/config/filter.rb
index 0a7e91c..2c80be8 100644
--- a/lib/leap_cli/config/filter.rb
+++ b/lib/leap_cli/config/filter.rb
@@ -97,6 +97,9 @@ module LeapCli
if @options[:local] === false
node_list = node_list[:environment => '!local']
end
+ if @options[:disabled] === false
+ node_list = node_list[:environment => '!disabled']
+ end
node_list
end
diff --git a/lib/leap_cli/config/manager.rb b/lib/leap_cli/config/manager.rb
index 2b4d0f5..b8343fe 100644
--- a/lib/leap_cli/config/manager.rb
+++ b/lib/leap_cli/config/manager.rb
@@ -255,8 +255,8 @@ module LeapCli
#
# same as filter(), but exits if there is no matching nodes
#
- def filter!(filters)
- node_list = filter(filters)
+ def filter!(filters, options={})
+ node_list = filter(filters, options)
Util::assert! node_list.any?, "Could not match any nodes from '#{filters.join ' '}'"
return node_list
end