ansible/ansible — pull request #6739 by PierrePaul (2014-03-28 00:54:38+00:00)
Title: Adding target as a valid param for state=present.

Will import the file specified by "target" when using the state=present.

Use case :
I want to create the basic schema for the database right after creating it. I don't want to run the .sql more than one time and only when creating the database the first time.

Right now I had to check if
- the database was already created and use "register" to save the output
- use state=present to create it
- use state=import + target=schema.sql when my_register=False

The overhead was a bit of a pain and changing the module was pretty easy.
Let me know what you think!

Note : the changes at line 298 and 299 are only removing the empty space at the end of the line.