puppet-lint cleanup
[puppet_openvpn.git] / manifests / init.pp
1 # openvpn.pp
2
3 class openvpn {
4     package {
5         'openvpn':
6             ensure => installed;
7     }
8     service {
9         'openvpn':
10             ensure     => running,
11             hasrestart => true,
12             hasstatus  => true,
13             require    => Exec['concat_/etc/default/openvpn'];
14     }
15     file {
16         '/etc/openvpn':
17             ensure  => directory,
18             require => Package['openvpn'];
19     }
20     file {
21         '/etc/openvpn/keys':
22             ensure  => directory,
23             require => File['/etc/openvpn'];
24     }
25
26     include concat::setup
27
28     concat {
29         '/etc/default/openvpn':
30             owner  => root,
31             group  => root,
32             mode   => 644,
33             warn   => true,
34             notify => Service['openvpn'];
35     }
36
37     concat::fragment {
38         'openvpn.default.header':
39             content => template('openvpn/etc-default-openvpn.erb'),
40             target  => '/etc/default/openvpn',
41             order   => 01;
42     }
43
44 }