From c1b4e74e2015eaf90330116ec494044d0a333a84 Mon Sep 17 00:00:00 2001 From: Mehdi Abaakouk Date: Tue, 3 May 2016 22:25:34 +0200 Subject: [PATCH] Don't fail if shared_ca directory exist https://github.com/luxflux/puppet-openvpn/pull/191 ensures the directory exists but when we use shared_ca, that means we will declare multiple servers with the same ca. So ensures the directory exists without failing for redeclaration. --- manifests/server.pp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/manifests/server.pp b/manifests/server.pp index f74bf898..2645b26f 100644 --- a/manifests/server.pp +++ b/manifests/server.pp @@ -567,17 +567,17 @@ group => $group_to_set, } - file { "${etc_directory}/openvpn/${name}": + ensure_resource(file, "${etc_directory}/openvpn/${name}", { ensure => directory, mode => '0750', notify => $lnotify, - } + }) if $shared_ca { - file { "${etc_directory}/openvpn/${ca_name}": + ensure_resource(file, "${etc_directory}/openvpn/${ca_name}", { ensure => directory, mode => '0750', notify => $lnotify, - } + }) } if $extca_enabled {