From 96d60568648555e28effd1398a791241a7ad3f7a Mon Sep 17 00:00:00 2001 From: varac Date: Thu, 22 Nov 2012 17:07:08 +0100 Subject: deploy openvpn server.crt and server.key --- puppet/modules/site_openvpn/manifests/init.pp | 1 + 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', } } -- cgit v1.2.3