A few issues:
1. The file /template/test.j2 needs to be available on the remote
node, because you specified "remote_src: yes". Fix this.
2. template_host is not a valid parameter for the template task - and
it is not clear what you expect this to do.
3. There appears to be no problem with the vars file json/UAT.json -
contrary to what you think.
As jborean93@gmail.com said the template module does NOT have a
remote_src paramater.
I mixed things up with the file module, which does have that.
A scenario whereby both the template src and destination are on the
remote node is only possible by fetching the template in an
intermediate step.
I remember having tried to combine slurp with copy+remote_src but that
didn't work.