summaryrefslogtreecommitdiff
path: root/puppet/modules/openvpn/manifests/init.pp
diff options
context:
space:
mode:
Diffstat (limited to 'puppet/modules/openvpn/manifests/init.pp')
m---------puppet/modules/openvpn8
-rw-r--r--puppet/modules/openvpn/manifests/init.pp45
2 files changed, 45 insertions, 8 deletions
diff --git a/puppet/modules/openvpn b/puppet/modules/openvpn
deleted file mode 160000
-Subproject 25f1fe8d813f6128068d890a40f5e24be78fb47
diff --git a/puppet/modules/openvpn/manifests/init.pp b/puppet/modules/openvpn/manifests/init.pp
new file mode 100644
index 00000000..a3dd70c0
--- /dev/null
+++ b/puppet/modules/openvpn/manifests/init.pp
@@ -0,0 +1,45 @@
+# openvpn.pp
+
+class openvpn {
+ package {
+ 'openvpn':
+ ensure => installed;
+ }
+ service {
+ 'openvpn':
+ ensure => running,
+ enable => true,
+ hasrestart => true,
+ hasstatus => true,
+ require => Exec['concat_/etc/default/openvpn'];
+ }
+ file {
+ '/etc/openvpn':
+ ensure => directory,
+ require => Package['openvpn'];
+ }
+ file {
+ '/etc/openvpn/keys':
+ ensure => directory,
+ require => File['/etc/openvpn'];
+ }
+
+ include concat::setup
+
+ concat {
+ '/etc/default/openvpn':
+ owner => root,
+ group => root,
+ mode => 644,
+ warn => true,
+ notify => Service['openvpn'];
+ }
+
+ concat::fragment {
+ 'openvpn.default.header':
+ content => template('openvpn/etc-default-openvpn.erb'),
+ target => '/etc/default/openvpn',
+ order => 01;
+ }
+
+}