I need to create or overwrite files on remote hosts. The modules `lineinfile` or `blockinfile` are useful when updating files, but not to create ones from scratch or completely overwrite existing ones.

The obvious solution is to use `copy` but I would like to have as much as possible a standalone playbook, without files on the side. **Is it possible to include in a playbook the content of the file to create?** 

Maybe something along the lines of having a variable with the content of the file which can be used as the `src=`parameter for `copy` (I tried this but it does not work as `src` expects a local file)