Skip to content

Commit e74a219

Browse files
authoredNov 13, 2018
Merge pull request #28 from mahant3sh/master
Flush configuration whenever there is an ensure property.
2 parents d06a6fe + 9bc0b92 commit e74a219

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)
Please sign in to comment.