diff options
author | varac <varacanero@zeromail.org> | 2012-10-04 22:35:16 +0200 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2012-10-04 22:35:16 +0200 |
commit | fc72260f601fb77b90d9f2f2afd2a43c4d5916f6 (patch) | |
tree | b08d80cc09b52204348e6ebcd0c120daa96770f1 | |
parent | b7277a8c666248a2a134f1d5b84c994df9904b7c (diff) |
+ site_openvpn::keys
-rw-r--r-- | puppet/modules/site_config/manifests/eip.pp | 5 | ||||
-rw-r--r-- | puppet/modules/site_openvpn/manifests/keys.pp | 23 |
2 files changed, 26 insertions, 2 deletions
diff --git a/puppet/modules/site_config/manifests/eip.pp b/puppet/modules/site_config/manifests/eip.pp index c8677696..6e866b1c 100644 --- a/puppet/modules/site_config/manifests/eip.pp +++ b/puppet/modules/site_config/manifests/eip.pp @@ -1,8 +1,9 @@ class site_config::eip { include site_openvpn + include site_openvpn::keys - $tor=hiera('tor') - notice("Tor enabled: $tor") + #$tor=hiera('tor') + #notice("Tor enabled: $tor") #$openvpn_configs=hiera('openvpn_server_configs') #create_resources('site_openvpn::server_config', $openvpn_configs) diff --git a/puppet/modules/site_openvpn/manifests/keys.pp b/puppet/modules/site_openvpn/manifests/keys.pp new file mode 100644 index 00000000..b31369c9 --- /dev/null +++ b/puppet/modules/site_openvpn/manifests/keys.pp @@ -0,0 +1,23 @@ +class site_openvpn::keys { + $openvpn_keys = hiera_hash('openvpn_keys') + + file { '/etc/openvpn/keys/ca.crt': + content => $openvpn_keys['ca'], + mode => '0644', + } + + file { '/etc/openvpn/keys/dh.pem': + content => $openvpn_keys['dh'], + mode => '0644', + } + + file { '/etc/openvpn/keys/server.key': + content => $openvpn_keys['server_key'], + mode => '0600', + } + + file { '/etc/openvpn/keys/server.crt': + content => $openvpn_keys['server_cert'], + mode => '0644', + } +} |