lib/puppet/provider/cs_colocation/crm.rb
# Flush is triggered on anything that has been detected as being
# modified in the property_hash.  It generates a temporary file with
# the updates that need to be made.  The temporary file is then used
# as stdin for the crm command.
Flush is triggered on anything that has been detected as being
modified in the property_hash.  It generates a temporary file with
the updates that need to be made.  The temporary file is then used
as stdin for the crm command.
Flush is triggered on anything that has been detected as being modified in the property_hash . It generates a temporary file with the updates that need to be made . The temporary file is then used as stdin for the crm command .
def flush
    unless @property_hash.empty?
      updated = "colocation "
      updated << "#{@property_hash[:name]} #{@property_hash[:score]}: #{@property_hash[:primitives].join(' ')}"
      Tempfile.open('puppet_crm_update') do |tmpfile|
        tmpfile.write(updated)
        tmpfile.flush
        ENV["CIB_shadow"] = @resource[:cib]
        crm('configure', 'load', 'update', tmpfile.path.to_s)
      end
    end
  end
def flush unless @property_hash . empty? updated = "colocation " updated << "#{@property_hash[:name]} #{@property_hash[:score]}: #{@property_hash[:primitives].join(' ')}" Tempfile . open ( 'puppet_crm_update' ) do | tmpfile | tmpfile . write ( updated ) tmpfile . flush ENV [ "CIB_shadow" ] = @resource [ :cib ] crm ( 'configure' , 'load' , 'update' , tmpfile . path . to_s ) end end end
Flush is triggered on anything that has been detected as being
modified in the property_hash.
Flush is triggered on anything that has been detected as being modified in the property_hash .