summaryrefslogtreecommitdiff
path: root/lib/leap_cli
diff options
context:
space:
mode:
Diffstat (limited to 'lib/leap_cli')
-rw-r--r--lib/leap_cli/config/manager.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/leap_cli/config/manager.rb b/lib/leap_cli/config/manager.rb
index 1f81166..dc74b6c 100644
--- a/lib/leap_cli/config/manager.rb
+++ b/lib/leap_cli/config/manager.rb
@@ -48,12 +48,14 @@ module LeapCli
end
# remove disabled nodes
+ @disabled_nodes = Config::ObjectList.new
unless options[:include_disabled]
@nodes.select! do |name, node|
if node.enabled
true
else
log 2, :skipping, "disabled node #{name}."
+ @disabled_nodes[name] = node
false
end
end
@@ -89,6 +91,14 @@ module LeapCli
updated_hiera << hierapath
end
+ if @disabled_nodes
+ # make disabled nodes appear as if they are still active
+ @disabled_nodes.each_node do |node|
+ updated_files << Path.named_path([:node_files_dir, node.name], @provider_dir)
+ updated_hiera << Path.named_path([:hiera, node.name], @provider_dir)
+ end
+ end
+
# remove files that are no longer needed
if existing_hiera
(existing_hiera - updated_hiera).each do |filepath|