Skip to content

Commit 9bc0b92

Browse files
author
mahantesh
committed
Flush configuration whenever there is an ensure property.
When erb templates got updated, the changes were not getting flushed. This code patch fixes it. Also fixed a typo.
1 parent d06a6fe commit 9bc0b92

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/puppet/provider/junos/junos_group.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -180,15 +180,16 @@ def flush
180180
if resource[:ensure] == :absent or
181181
resource[:active] != @ndev_res[:active]
182182
Puppet::Provider::Junos.instance_method(:flush).bind(self).call
183+
@flush_exec = true
183184
else
184185
Puppet.debug( "#{self.resource.type}:: Nothing to flush #{resource[:name]}" )
185186
end
186187
elsif resource[:ensure] == :present
187188
Puppet::Provider::Junos.instance_method(:flush).bind(self).call
189+
@flush_exec = true
188190
else
189191
Puppet.debug( "#{self.resource.type}:: Nothing to flush #{resource[:name]}" )
190192
end
191-
@flush_exec = true
192193
end
193194
end
194195

lib/puppet/provider/junos/junos_parent.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def exists?
6262

6363
def flush
6464
if defined? @ndev_res[:name]
65-
Puppet.debug( "#{self.resource.type}:: Flusing #{resource[:name]}" )
65+
Puppet.debug( "#{self.resource.type}:: Flushing #{resource[:name]}" )
6666
config_update resource[:name]
6767
else
6868
Puppet.debug( "#{self.resource.type}:: Nothing to flush #{resource[:name]}" )

0 commit comments

Comments
 (0)