I'm using Ansible 1.6.6 to provision my machine.
There is a template task in my playbook that creates destination file from Jinja2 template:
tasks:
- template: src=somefile.j2 dest=/etc/somefile.conf
I do not want to replace somefile.conf if it already exists. Is it possible with Ansible? If so, how?
forceto the Ansible template module that does precisely that. This option was introduced a long time ago (years), but I don't find when in the patch notes. – 4wk_ Apr 17 '23 at 08:26