ansible/ansible — pull request #2256 by skinp (2013-03-01 19:09:04+00:00)
Title: Add argument "content" to file module

New argument `content` available to the file module. This enables setting the content of a file without requiring to use the template or copy module. This is particularly useful in combination with registers:

- action: command md5sum /path/to/file
register: file_sign

- action: file: path=/path/to/file.sign content="${file_sign.stdout}"

I thought the `set_file_content_if_different` function could be useful in other cases so I put it in module_common.py. I could easily put it back in the file module itself if you prefer...