lib/puppet/provider/mobileconfig.rb
# Formats the PayloadContent data for use the in the resource
Formats the PayloadContent data for use the in the resource
Formats the PayloadContent data for use the in the resource
def prepare_content(content)
      content.collect do |item|
        settings = item.delete('PayloadContent')
        ::ManagedMacCommon::FILTERED_PAYLOAD_KEYS.each do |key|
          item.delete_if     { |k| k.eql?(key) }
          settings.delete_if { |k| k.eql?(key) }
        end
        settings.reject! { |k| k =~ /\AAD.*Flag\z/ }
        item.merge settings
      end
    end
def prepare_content ( content ) content . collect do | item | settings = item . delete ( 'PayloadContent' ) :: ManagedMacCommon :: FILTERED_PAYLOAD_KEYS . each do | key | item . delete_if { | k | k . eql? ( key ) } settings . delete_if { | k | k . eql? ( key ) } end settings . reject! { | k | k =~ / \A AD.*Flag \z / } item . merge settings end end
Formats the PayloadContent data for use the in the resource
Formats the PayloadContent data for use the in the resource
# Extract the PayloadContent # Scrub the filtered keys # Reject AD Flag keys # We do this here so the `puppet resource mobileconfig ...` will return # the correct :content no matter which provider is used. This feels # cheap, but it is economical and may be required by other subclasses # of the mobielconfig provider down the road.
content