aboutsummaryrefslogtreecommitdiff
path: root/lib/leap_cli/commands/clean.rb
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2012-10-21 16:17:05 -0700
committerelijah <elijah@riseup.net>2012-10-21 16:17:05 -0700
commit94dd3b4d99a67679adcc3a9921f9e1fa78783cba (patch)
tree537e0a290801c2783ab24eb5c932c44c0c7f7c86 /lib/leap_cli/commands/clean.rb
parent338b3d97b8cb0f5fca0339514ffdfaf30cc65498 (diff)
downloadleap_cli-94dd3b4d99a67679adcc3a9921f9e1fa78783cba.tar.gz
leap_cli-94dd3b4d99a67679adcc3a9921f9e1fa78783cba.tar.bz2
added command init-node
Diffstat (limited to 'lib/leap_cli/commands/clean.rb')
-rw-r--r--lib/leap_cli/commands/clean.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/leap_cli/commands/clean.rb b/lib/leap_cli/commands/clean.rb
new file mode 100644
index 0000000..ed9c901
--- /dev/null
+++ b/lib/leap_cli/commands/clean.rb
@@ -0,0 +1,16 @@
+module LeapCli
+ module Commands
+
+ desc 'Removes all files generated with the "compile" command'
+ command :clean do |c|
+ c.action do |global_options,options,args|
+ Dir.glob(named_path(:hiera, '*')).each do |file|
+ remove_file! file
+ end
+ remove_file! named_path(:authorized_keys)
+ remove_file! named_path(:known_hosts)
+ end
+ end
+
+ end
+end \ No newline at end of file