summaryrefslogtreecommitdiff
path: root/puppet/modules/site_openvpn/manifests/keys.pp
blob: b31369c90b1bd53adae0578703d50186d8858e7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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',
  }
}