Skip to content

Commit

Permalink
Add option to disable ordering dependencies on Openvpn::Client
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Pritz <[email protected]>
  • Loading branch information
Bluewind committed Jul 16, 2019
1 parent 05620f8 commit 72e419f
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions manifests/client_specific_config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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,
Expand Down

0 comments on commit 72e419f

Please sign in to comment.