summaryrefslogtreecommitdiff
path: root/lib/leap_cli/commands/clean.rb
blob: ed9c901715f21247e0cf52e362e1305b6511a503 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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