I think the main objection was the = sign in here. Yaml can represent a hash, which is what the rax module is looking for, like this:

files:
  /root/.ssh/authorized_keys: /home/localuser/.ssh/id_rsa.pub
  /root/test.txt: /home/localuser/test.txt