The key-value pairs can be passed indented in the file like the following example.
name: valuename key: value secondkey: 2
Also, it is possible to put all in the same line like the following example.
{name:valuename,key:value,secondkey:2}
NOTE: Add all values in the same line is not a good practice at all since it makes hard to read.
For further information, check YAML Syntax in the Ansible documentation.