I concur, that is an unfortunate side-effect. The only thing you can then do is to treat yaml as a thing that is constantly out to get you. Make all values strings and use things like > or >- to write strings without having to escape quotes, don't rely on any referencing, except for Ansible's templating itself. Do not code in yaml. Or, if you really want to, perhaps you could even write yaml like json, since json should be accepted format for yaml files.
Coming from Ansible I can understand the distrust in yaml. But I haven't seen half as much yaml weirdness in Kubernetes (and i associate age/sops with k8s). At least not since I stopped making my own helm charts.
More notably, then you'd have to use Ansible.
any suggestions on a better config management tool?
NixOS
yea... don't really want to have to change OS for a CM tool
If the thing accepts YAML it often also accepts a equivalent JSON.
yaml is a superset of json, so by definition anything that accepts yaml _must_ accept json