backup location in template module

Dear All,

I have below line from my ansible playbook which uses template module.

`

  • template: src=nginx_conf.j2 dest=/etc/nginx/nginx.conf backup=yes
    `

This works great, but create a backup in the same directory (/etc/nginx/ in this case). Is there a way out to somehow create the backup on a different location, say /etc/nginx/backups/ directory.

Regards,
Vikas

not yet, a couple of features we have been considering a)configurable
'backup depo' on target machine (/var/cache/ansible/backups) and/or
backup up on 'master'.

Thank you Brian. I would look forward to have this feature.

Regards,
Vikas

Hi,

Any update on this?

Is there a workaround to achieve this? Maybe with a callback plugin?

Thanks!

Best regards,
Joel.