File: stub.rb

package info (click to toggle)
ruby-puppetserver-ca-cli 2.7.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 696 kB
  • sloc: ruby: 6,970; sh: 4; makefile: 3
file content (17 lines) | stat: -rw-r--r-- 486 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
require 'fileutils'

module Puppetserver
  module Ca
    module Stub
      KEY_PATH    = '/var/lib/puppet/ssl/ca/ca_key.pem'
      BUNDLE_PATH = '/var/lib/puppet/ssl/ca/ca_crt.pem'
      CRL_PATH    = '/var/lib/puppet/ssl/ca/ca_crl.pem'

      def self.import(key, bundle, crl)
        FileUtils.copy(File.absolute_path(key), KEY_PATH)
        FileUtils.copy(File.absolute_path(bundle), BUNDLE_PATH)
        FileUtils.copy(File.absolute_path(crl), CRL_PATH)
      end
    end
  end
end