Templates - Create, but do NOT update

Hello,

This might be a wierd feature request at first, but would you accept a PR to add an option to the template module to create but do NOT update the generated file?

I find myself needing this when generating secrets.
I do want to generate my secret file if it does not exists (and it needs to be generated to a form dictated by a template), but I do not want to change its contents which is usually generated by a PRNG.

Regards,
Akos Vandra

You could stat the file using the stat module to see if it exists and register it’s result, then run your template task conditionally, only if the file does not exist.

Hi Akos,

The template module (being part of the file module family), does support the use of force=no, meaning the file will not be replaced if it already exists. This is not documented on that modules page, which we will get updated.

Thanks!