That's interesting, I could imagine using that in some sort of DevOps auto-configure situation, but DNS lookups aren't encrypted so someone malicious could rewrite the response and control what you execute.
Actually Google's DNS over HTTPS API is used, so it is encrypted and also secured using DNSSEC.