Do not configure dns_canonicalize_hostname on CC7
The dns_canonicalize_hostname = fallback
setting is causing parse errors on CC7. I moved it to another file which is installed only if OS release is 8 or newer.
I also did some refactoring to removed duplicated testing code.