File: vs_ssl.rb

package info (click to toggle)
puppet-module-vswitch 21.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 596 kB
  • sloc: ruby: 2,189; python: 38; sh: 10; makefile: 10
file content (43 lines) | stat: -rw-r--r-- 964 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
Puppet::Type.newtype(:vs_ssl) do

  ensurable

  newparam(:name, :namevar => true) do
    desc "Name of SSL configuration"
    newvalues(/^\w+$/)
  end

  newparam(:key_file) do
    desc "Private key file path"
    validate do |value|
      if !value.is_a?(String)
        raise ArgumentError, "Key file path must be a string"
      end
    end
  end

  newparam(:cert_file) do
    desc "Certificate filepath"
    validate do |value|
      if !value.is_a?(String)
        raise ArgumentError, "Certificate file path must be a string"
      end
    end
  end

  newparam(:ca_file) do
    desc "CA authority certificate file path"
    validate do |value|
      if value
        if !value.is_a?(String)
          raise ArgumentError, "CA cert file path must be a string"
        end
      end
    end
  end

  newparam(:bootstrap, :boolean => true) do
    desc "Enable bootstrapping without CA certificate and accept controller CA cert"
    defaultto false
  end
end