Closed treydock closed 4 years ago
I'm not opposed to using concat, I just don't understand what it gets us that file_line is not providing.
As for design, I often have facts that are not managed by Puppet that are created during a provisioning process and would not want to remove those by default. It sounds like you do want to manage all of those through Puppet and remove them if they are not, which sounds good, but should be optional. We could solve that by using the resources type and purging resources that match a tag.
I redid this PR so that there is a purge_facts
parameter that defaults to false
to maintain old behavior. When the value is true
the concat
module is used to build the facts file so that unmanaged facts get deleted. This is using commit from #63 and I can rebase if #63 is merged first.
Right now if I define a facter::fact and then remove it from catalog, the fact is left behind in facts file. This would ensure facts file only contains facts put in place by Puppet.