I read yaml for ansible like an ordered array.
It’s a namespace with the values you want inline, in my head
They’re INI files or .cfg to me
Not code
The code is the Python in Ansible, or Go in TF, that applies those values
Using config mgmt tools like they’re vanilla programming languages is weird.