Skip to content

Commit 8c68e67

Browse files
authored
Merge pull request #330 from wtfo-guru/fix_client_specific_option_push
use double quotes on all push options
2 parents ba39438 + 7097b59 commit 8c68e67

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

spec/defines/openvpn_client_specific_config_spec.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@
5151
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$}) }
5252
it { is_expected.to contain_file('/etc/openvpn/test_server/client-configs/test_client').with_content(%r{^iroute-ipv6 2001:db8:1234::/64$}) }
5353
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$}) }
54-
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$}) }
55-
it { is_expected.to contain_file('/etc/openvpn/test_server/client-configs/test_client').with_content(%r{^push redirect-gateway def1$}) }
54+
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"$}) }
55+
it { is_expected.to contain_file('/etc/openvpn/test_server/client-configs/test_client').with_content(%r{^push "redirect-gateway def1"$}) }
5656
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"$}) }
5757
end
5858
end

templates/client_specific_config.erb

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ iroute-ipv6 <%= iroute_ipv6 %>
88
ifconfig-push <%= ifconfig %>
99
<% end -%>
1010
<% @dhcp_options.each do |option| -%>
11-
push dhcp-option <%= option %>
11+
push "dhcp-option <%= option %>"
1212
<% end -%>
1313
<% if @redirect_gateway -%>
14-
push redirect-gateway def1
14+
push "redirect-gateway def1"
1515
<% end -%>
1616
<% @route.each do |route| -%>
1717
push "route <%= route %>"

0 commit comments

Comments
 (0)