File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 1212
1313 describe 'without parameters' do
1414 it { is_expected . to create_class ( 'keepalived::global_defs' ) }
15+ it { is_expected . to contain_concat__fragment ( 'keepalived.conf_globaldefs' ) . without ( 'content' => %(snmp_socket) ) }
1516 end
1617
1718 describe 'with parameter notification_email as string' do
377378 describe 'with parameter snmp_socket' do
378379 let ( :params ) do
379380 {
380- snmp_socket : '/path'
381+ snmp_socket : '/path' ,
382+ enable_snmp_vrrp : true
381383 }
382384 end
383385
Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ global_defs {
123123 <%- if @dynamic_interfaces -%>
124124 dynamic_interfaces
125125 <%- end -%>
126- <%- if @snmp_socket -%>
126+ <%- if @snmp_socket && (@enable_snmp_keepalived || @enable_snmp_vrrp || @enable_snmp_checker || @enable_snmp_rfc || @enable_snmp_rfcv2 || @enable_snmp_rfcv3) -%>
127127 snmp_socket <%= @snmp_socket %>
128128 <%- end -%>
129129 <%- if @vrrp_notify_fifo -%>
You can’t perform that action at this time.
0 commit comments