summaryrefslogtreecommitdiff
path: root/lib/leap_cli/commands/compile.rb
blob: 45e4f2b3d0f7dceb11616f615b834ed74625726d (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 'Compiles node configuration files into hiera files used for deployment'
    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