File tree Expand file tree Collapse file tree 3 files changed +7
-0
lines changed Expand file tree Collapse file tree 3 files changed +7
-0
lines changed Original file line number Diff line number Diff line change 88# @param iroute_ipv6 Array of IPv6 iroute combinations.
99# @param route Array of route combinations pushed to client.
1010# @param ifconfig IP configuration to push to the client.
11+ # @param ifconfig_ipv6 IPv6 configuration to push to the client.
1112# @param dhcp_options DHCP options to push to the client.
1213# @param redirect_gateway Redirect all traffic to gateway
1314# @param ensure Sets the client specific configuration file status (present or absent)
2728 Array[String] $iroute_ipv6 = [],
2829 Array[String] $route = [],
2930 Variant[Boolean, String] $ifconfig = false ,
31+ Optional[String[1]] $ifconfig_ipv6 = undef ,
3032 Array[String] $dhcp_options = [],
3133 Boolean $redirect_gateway = false ,
3234) {
Original file line number Diff line number Diff line change 4242 iroute : [ '10.0.1.0 255.255.255.0' ] ,
4343 iroute_ipv6 : [ '2001:db8:1234::/64' ] ,
4444 ifconfig : '10.10.10.2 255.255.255.0' ,
45+ ifconfig_ipv6 : '2001:db8:0:123::2/64 2001:db8:0:123::1' ,
4546 route : [ '10.200.100.0 255.255.255.0 10.10.10.1' ] ,
4647 dhcp_options : [ 'DNS 8.8.8.8' ] ,
4748 redirect_gateway : true
5152 it { is_expected . to contain_file ( '/etc/openvpn/test_server/client-configs/test_client' ) . with_content ( %r{^iroute 10.0.1.0 255.255.255.0$} ) }
5253 it { is_expected . to contain_file ( '/etc/openvpn/test_server/client-configs/test_client' ) . with_content ( %r{^iroute-ipv6 2001:db8:1234::/64$} ) }
5354 it { is_expected . to contain_file ( '/etc/openvpn/test_server/client-configs/test_client' ) . with_content ( %r{^ifconfig-push 10.10.10.2 255.255.255.0$} ) }
55+ it { is_expected . to contain_file ( '/etc/openvpn/test_server/client-configs/test_client' ) . with_content ( %r{^ifconfig-ipv6-push 2001:db8:0:123::2/64 2001:db8:0:123::1$} ) }
5456 it { is_expected . to contain_file ( '/etc/openvpn/test_server/client-configs/test_client' ) . with_content ( %r{^push "dhcp-option DNS 8.8.8.8"$} ) }
5557 it { is_expected . to contain_file ( '/etc/openvpn/test_server/client-configs/test_client' ) . with_content ( %r{^push "redirect-gateway def1"$} ) }
5658 it { is_expected . to contain_file ( '/etc/openvpn/test_server/client-configs/test_client' ) . with_content ( %r{^push "route 10.200.100.0 255.255.255.0 10.10.10.1"$} ) }
Original file line number Diff line number Diff line change @@ -7,6 +7,9 @@ iroute-ipv6 <%= iroute_ipv6 %>
77<% if ifconfig = @ifconfig -%>
88ifconfig-push <%= ifconfig %>
99<% end -%>
10+ <% if @ifconfig_ipv6 -%>
11+ ifconfig-ipv6-push <%= @ifconfig_ipv6 %>
12+ <% end -%>
1013<% @dhcp_options.each do |option| -%>
1114push "dhcp-option <%= option %> "
1215<% end -%>
You can’t perform that action at this time.
0 commit comments