Skip to content

Commit

Permalink
prohibit empty string for $compression
Browse files Browse the repository at this point in the history
  • Loading branch information
bastelfreak committed Oct 21, 2018
1 parent bb06083 commit 53c7ae3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions manifests/client.pp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# [*compression*]
# String. Which compression algorithim to use
# Default: comp-lzo
# Options: comp-lzo or '' (disable compression)
# Options: comp-lzo or undef (disable compression)
#
# [*dev*]
# String. Device method
Expand Down Expand Up @@ -195,7 +195,7 @@
#
define openvpn::client (
String $server,
String $compression = 'comp-lzo',
Optional[String[1]] $compression = 'comp-lzo',
String $dev = 'tun',
Integer $mute = 20,
Boolean $mute_replay_warnings = true,
Expand Down
4 changes: 2 additions & 2 deletions manifests/server.pp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
# [*compression*]
# String. Which compression algorithim to use
# Default: comp-lzo
# Options: comp-lzo or '' (disable compression)
# Options: comp-lzo or undef (disable compression)
#
# [*dev*]
# String. TUN/TAP virtual network device
Expand Down Expand Up @@ -448,7 +448,7 @@
Optional[String] $email = undef,
Optional[Array] $remote = undef,
String $common_name = 'server',
String $compression = 'comp-lzo',
Optional[String[1]] $compression = 'comp-lzo',
String $dev = 'tun0',
String $user = 'nobody',
Optional[String] $group = undef,
Expand Down
2 changes: 1 addition & 1 deletion templates/client.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ proto <%= @proto %>
<% @remote_host.each do |item| -%>
remote <%= item %> <%= @port %>
<% end -%>
<% if @compression != '' -%>
<% if @compression -%>
<%= @compression %>
<% end -%>
resolv-retry <%= @resolv_retry %>
Expand Down
2 changes: 1 addition & 1 deletion templates/server.erb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ tls-server
<% if @tls_client -%>
tls-client
<% end -%>
<% if @compression != '' -%>
<% if @compression -%>
<%= @compression %>
<% end -%>
group <%= @group_to_set %>
Expand Down

0 comments on commit 53c7ae3

Please sign in to comment.