summaryrefslogtreecommitdiff
path: root/lib/leap_cli/commands/compile.rb
blob: 9882e6a45586e08d9ced00f7ee25b938e16f05ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

module LeapCli
  module Commands

    desc 'Compile json files to hiera configs'
    command :compile do |c|
      c.action do |global_options,options,args|
        # these must come first
        update_compiled_ssh_configs

        # export generated files
        manager.export_nodes
        manager.export_secrets
      end
    end

    def update_compiled_ssh_configs
      update_authorized_keys
      update_known_hosts
    end

  end
end