|
Owen Rodabaugh I'm fine closing this as wontfix, but your solution doesn't make sense.
> assume that exported resources which are present but not collected(don't exist in PDB) should be purged.
If an exported resource "doesn't exist in PDB" then we have no record of it, won't actually know it was exported, and won't be able to purge it. E.g. it'll just be another file, or user, or whatever on the system like any other.
Is there something I'm missing here?
You can use the resources resource to do this, sure, but that's definitely not equivalent functionality to --unexport for several reasons.
Firstly, sure, I can do:
resources { 'user':
|
purge => true,
|
}
|
That's will definitely purge any users not still exported. However it will ALSO purge any other users not managed by puppet...even if they were never managed.
Secondly, there are resources that you could --unexport which you CANNOT purge. E.g.:
resources { 'file':
|
purge => true,
|
}
|
What does that do? Nothing, of course, because having puppet be able to purge all the files on the system not managed by puppet would be bonkers.
So yeah, it's fine if we want to close this wontfix — I think automatically removing resources that are no longer exported is crazy. If you want to remove a resource, then write puppet code to remove it....but purge is nowhere near the same as --unexport.
Of course, maybe you're referring to something else I don't know about 
|