diff options
author | varac <varacanero@zeromail.org> | 2012-11-22 17:07:08 +0100 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2012-11-22 17:07:08 +0100 |
commit | 96d60568648555e28effd1398a791241a7ad3f7a (patch) | |
tree | f833ccdf92d01118afed8841da4180b83bd0f3dd /puppet/modules/site_openvpn/manifests | |
parent | c2d57624c15dfaff038f9991f04ade46b5ad1d40 (diff) |
deploy openvpn server.crt and server.key
Diffstat (limited to 'puppet/modules/site_openvpn/manifests')
-rw-r--r-- | puppet/modules/site_openvpn/manifests/init.pp | 1 | ||||
-rw-r--r-- | puppet/modules/site_openvpn/manifests/keys.pp | 11 |
2 files changed, 6 insertions, 6 deletions
diff --git a/puppet/modules/site_openvpn/manifests/init.pp b/puppet/modules/site_openvpn/manifests/init.pp index 7268fe76..ae24b276 100644 --- a/puppet/modules/site_openvpn/manifests/init.pp +++ b/puppet/modules/site_openvpn/manifests/init.pp @@ -11,6 +11,7 @@ class site_openvpn { $openvpn_udp_network_prefix = '10.2.0' $openvpn_udp_netmask = '255.255.248.0' $openvpn_udp_cidr = '21' + $x509_config = hiera('x509') include site_openvpn diff --git a/puppet/modules/site_openvpn/manifests/keys.pp b/puppet/modules/site_openvpn/manifests/keys.pp index 47d0fa26..e198cbf8 100644 --- a/puppet/modules/site_openvpn/manifests/keys.pp +++ b/puppet/modules/site_openvpn/manifests/keys.pp @@ -1,28 +1,27 @@ class site_openvpn::keys { - $openvpn_keys = hiera_hash('openvpn') file { '/etc/openvpn/keys/ca.key': - content => $openvpn_keys['ca_key'], + content => $site_openvpn::openvpn_config['ca_key'], mode => '0600', } file { '/etc/openvpn/keys/ca.crt': - content => $openvpn_keys['ca_crt'], + content => $site_openvpn::openvpn_config['ca_crt'], mode => '0644', } file { '/etc/openvpn/keys/dh.pem': - content => $openvpn_keys['dh'], + content => $site_openvpn::openvpn_config['dh'], mode => '0644', } file { '/etc/openvpn/keys/server.key': - content => $openvpn_keys['server_key'], + content => $site_openvpn::x509_config['key'], mode => '0600', } file { '/etc/openvpn/keys/server.crt': - content => $openvpn_keys['server_crt'], + content => $site_openvpn::x509_config['cert'], mode => '0644', } } |