Ansible File module

Which allows you to set attributes of files and do other useful things with files, symlinks and directories.

Using the file module with the combitation with path and state it would provide us with all we need to fulfill the same outcome as the touch command in Linux.

Examples:

ansible all -m file -a 'path=/tmp/test state=touch'
ansible all -m file -a 'path=/tmp/test state=file mode=600'