Add an append_file_content function

Add content to a file resource.

This allows to generate concatenated files on the master side, without managing multiple file resources.

The first argument is the file path. You are responsible for creating the file resource yourself prior to calling the function. This way, you can finely control the file's parameters.

The second argument is the content to be added to the file.

The third (optional) argument is the order, specifying the position in which the content should be added. The default order is '10'. If you specified a content in the original file resource, this content is kept with order '00'

Examples:


    file { '/tmp/target':
      content => "Orig content\n",
    }

    append_file_content('/tmp/target', "hello, ")
    append_file_content('/tmp/target', "world\n")
    append_file_content('/tmp/target', "This is a multi
    line statement
    ", '01')
    append_file_content('/tmp/target', template('foobar/example.erb'), '05')

- *Type* : statement

That's actually worse than behavior I was worrying about, which was the content/order changing in the manifest without restarting the master and having stale fragments get pulled in.  At least that shouldn't happen if the instance variable is tied to the class/define scope.

I tried to figure out the parser this morning (har, har) and it wasn't clear to me what the 'scope' is that's used to eval the function.

https://github.com/puppetlabs/puppet/blob/master/lib/puppet/parser/ast/function.rb#L11