Class | Puppet::Provider::ParsedFile |
In: |
lib/puppet/provider/parsedfile.rb
|
Parent: | Puppet::Provider |
This provider can be used as the parent class for a provider that parses and generates files. Its content must be loaded via the ‘prefetch’ method, and the file will be written when ‘flush’ is called on the provider instance. At this point, the file is written once for every provider instance.
Once the provider prefetches the data, it‘s the resource‘s job to copy that data over to the @is variables.
default_target | [RW] | |
property_hash | [RW] | |
target | [RW] |
Make sure our file is backed up, but only back it up once per transaction. We cheat and rely on the fact that @records is created on each prefetch.
Return the header placed at the top of each generated file, warning users that modifying this file manually is probably a bad idea.
Retrieve all of the data from disk. There are three ways to know which files to retrieve: We might have a list of file objects already set up, there might be instances of our associated resource and they will have a path parameter set, and we will have a default path set. We need to turn those three locations into a list of files, prefetch each one, and make sure they‘re associated with each appropriate resource instance.
Should we skip the record? Basically, we skip text records. This is only here so subclasses can override it.