I have an ansible playbook that downloads file from the internet and unarchives them and then sends them to another host machine.
- hosts: group1
sudo: yes
tasks:
- name: Extract Apache Tomcat from local file
unarchive:
src: /etc/ansible/files/apache-tomcat-9.0.1.tar.gz
dest: /opt/
remote_src: no
- name: Copy file to host
copy:
src: /etc/ansible/files/myfile.xml
dest: /opt/apache-tomcat-9.0.1/conf/myfile.xml
But everytime I use the unarchive module, ansible is overwriting files with the same content.