lib/puppet/provider/macgroup/default.rb
# Puppet MAGIC
# The flush method is called once per resource whenever the
# 'is' and 'should' values for a property differ
# (and synchronization needs to occur).
# As per Shit Gary Says: http://bit.ly/1j9ou3Q
Puppet MAGIC
The flush method is called once per resource whenever the
'is' and 'should' values for a property differ
(and synchronization needs to occur).
Puppet MAGIC The flush method is called once per resource whenever the ' is ' and ' should ' values for a property differ ( and synchronization needs to occur ) .
def flush
    manage_group
    all_groups = self.class.list_all_groups
    this_group = all_groups.find do |group|
      group['name'].eql? [resource[:name]]
    end
    @property_hash = self.class.get_resource_properties(this_group)
  end
def flush manage_group all_groups = self . class . list_all_groups this_group = all_groups . find do | group | group [ 'name' ] . eql? [ resource [ :name ] ] end @property_hash = self . class . get_resource_properties ( this_group ) end
Puppet MAGIC
The flush method is called once per resource whenever the
'is' and 'should' values for a property differ
(and synchronization needs to occur).
Puppet MAGIC The flush method is called once per resource whenever the ' is ' and ' should ' values for a property differ ( and synchronization needs to occur ) .
# Do what needs to be done # Collect the resources again once they've been changed (that way `puppet # resource` will show the correct values after changes have been made).