Long, long ago, I used a library called Augeas (https://augeas.net/) in a drift-detection product*, so that if we detected a difference in config files, either on the same server through time, or on different servers that were supposed to be similar, we could de-noise the diffs, and more importantly, let users write fine-grained, but syntax-tolerant, allow-lists like "this particular setting is allowed to differ"... or even "this particular setting can have one of the following list of values". :)
* the company was acquired by Splunk years after we shelved that product
* the company was acquired by Splunk years after we shelved that product