Skip to content

Instantly share code, notes, and snippets.

@NoodlesNZ
Created May 29, 2018 03:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NoodlesNZ/6a826dc1cf61884d6e021432033e900b to your computer and use it in GitHub Desktop.
Save NoodlesNZ/6a826dc1cf61884d6e021432033e900b to your computer and use it in GitHub Desktop.
Puppet EPP
define openvpn::ca (
String $country,
String $province,
String $city,
String $organization,
String $email,
String $common_name = 'server',
Optional[String] $group = undef,
Integer $ssl_key_size = 2048,
Integer $ca_expire = 3650,
Integer $key_expire = 3650,
Integer $crl_days = 30,
String $key_cn = '',
String $key_name = '',
String $key_ou = '',
Boolean $tls_auth = false,
) {
file { "/etc/openvpn/test/easy-rsa/vars":
ensure => file,
mode => '0550',
content => epp('openvpn/vars-30.epp'),
}
}
export EASYRSA_REQ_COUNTRY="<%= $::openvpn::ca::country %>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment