Skip to content

Commit 5ff86b8

Browse files
add route_ipv6 to openvpn::client_specific_config (#451)
* add route_ipv6 to openvpn::client_specific_config * add documentation * updated REFERENCE.md
1 parent 39019e9 commit 5ff86b8

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

REFERENCE.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -770,6 +770,7 @@ The following parameters are available in the `openvpn::client_specific_config`
770770
* [`iroute`](#-openvpn--client_specific_config--iroute)
771771
* [`iroute_ipv6`](#-openvpn--client_specific_config--iroute_ipv6)
772772
* [`route`](#-openvpn--client_specific_config--route)
773+
* [`route_ipv6`](#-openvpn--client_specific_config--route_ipv6)
773774
* [`ifconfig`](#-openvpn--client_specific_config--ifconfig)
774775
* [`ifconfig_ipv6`](#-openvpn--client_specific_config--ifconfig_ipv6)
775776
* [`dhcp_options`](#-openvpn--client_specific_config--dhcp_options)
@@ -808,6 +809,14 @@ Array of route combinations pushed to client.
808809

809810
Default value: `[]`
810811

812+
##### <a name="-openvpn--client_specific_config--route_ipv6"></a>`route_ipv6`
813+
814+
Data type: `Array[String[1]]`
815+
816+
Array of route-ipv6 combinations pushed to client.
817+
818+
Default value: `[]`
819+
811820
##### <a name="-openvpn--client_specific_config--ifconfig"></a>`ifconfig`
812821

813822
Data type: `Optional[String[1]]`

manifests/client_specific_config.pp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
# @param iroute Array of iroute combinations.
88
# @param iroute_ipv6 Array of IPv6 iroute combinations.
99
# @param route Array of route combinations pushed to client.
10+
# @param route_ipv6 Array of route-ipv6 combinations pushed to client.
1011
# @param ifconfig IP configuration to push to the client.
1112
# @param ifconfig_ipv6 IPv6 configuration to push to the client.
1213
# @param dhcp_options DHCP options to push to the client.
@@ -29,6 +30,7 @@
2930
Array[String[1]] $iroute = [],
3031
Array[String[1]] $iroute_ipv6 = [],
3132
Array[String[1]] $route = [],
33+
Array[String[1]] $route_ipv6 = [],
3234
Optional[String[1]] $ifconfig = undef,
3335
Optional[String[1]] $ifconfig_ipv6 = undef,
3436
Array[String[1]] $dhcp_options = [],

spec/defines/openvpn_client_specific_config_spec.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
ifconfig: '10.10.10.2 255.255.255.0',
5656
ifconfig_ipv6: '2001:db8:0:123::2/64 2001:db8:0:123::1',
5757
route: ['10.200.100.0 255.255.255.0 10.10.10.1'],
58+
route_ipv6: ['2001:db8:1::/64'],
5859
dhcp_options: ['DNS 8.8.8.8'],
5960
custom_options: { 'this' => 'that' },
6061
redirect_gateway: true
@@ -70,6 +71,7 @@
7071
with_content(%r{ifconfig-push 10.10.10.2 255.255.255.0}).
7172
with_content(%r{ifconfig-ipv6-push 2001:db8:0:123::2/64 2001:db8:0:123::1}).
7273
with_content(%r{route 10.200.100.0 255.255.255.0 10.10.10.1}).
74+
with_content(%r{push "route-ipv6 2001:db8:1::/64}).
7375
with_content(%r{dhcp-option DNS 8.8.8.8}).
7476
with_content(%r{this that}).
7577
with_content(%r{redirect-gateway})

templates/client_specific_config.erb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ push "redirect-gateway def1"
1919
<% @route.each do |route| -%>
2020
push "route <%= route %>"
2121
<% end -%>
22+
<% @route_ipv6.each do |route| -%>
23+
push "route-ipv6 <%= route %>"
24+
<% end -%>
2225
<% @custom_options.each_pair do |key, value| -%>
2326
<%= key %> <%= value %>
2427
<% end -%>

0 commit comments

Comments
 (0)