From 72e419f5fff2f4b1f3c824fb283aea828369064d Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Tue, 16 Jul 2019 15:48:01 +0200 Subject: [PATCH] Add option to disable ordering dependencies on Openvpn::Client Signed-off-by: Florian Pritz --- manifests/client_specific_config.pp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/manifests/client_specific_config.pp b/manifests/client_specific_config.pp index 7b250d07..fa457dba 100644 --- a/manifests/client_specific_config.pp +++ b/manifests/client_specific_config.pp @@ -12,6 +12,7 @@ # @param dhcp_options DHCP options to push to the client. # @param redirect_gateway Redirect all traffic to gateway # @param ensure Sets the client specific configuration file status (present or absent) +# @param manage_clients Manage dependencies on Openvpn::Client ressources # # @example # openvpn::client_specific_config { @@ -31,11 +32,17 @@ Optional[String[1]] $ifconfig_ipv6 = undef, Array[String] $dhcp_options = [], Boolean $redirect_gateway = false, + Boolean $manage_client_configs = true, ) { - Openvpn::Server[$server] - -> Openvpn::Client[$name] - -> Openvpn::Client_specific_config[$name] + if $manage_clients { + Openvpn::Server[$server] + -> Openvpn::Client[$name] + -> Openvpn::Client_specific_config[$name] + } else { + Openvpn::Server[$server] + -> Openvpn::Client_specific_config[$name] + } file { "${openvpn::etc_directory}/openvpn/${server}/client-configs/${name}": ensure => $ensure,