hi,
so this is what I have in my yml file:
- name: Copy War File
copy: src=externaluserwebapi.war dest=/usr/share/tomcat7/webapps
become: True
become_method: sudo
and this is what I get when I run playbook:
ok: [10.1.33.227] => {“changed”: false, “checksum”: “c93572d33bd0555a87341380ac389382c225a92d”, “dest”: “/usr/share/tomcat7/webapps/externaluserwebapi.war”, “gid”: 0, “group”: “root”, “invocation”: {“module_args”: {“backup”: false, “content”: null, “delimiter”: null, “dest”: “/usr/share/tomcat7/webapps/externaluserwebapi.war”, “directory_mode”: null, “follow”: false, “force”: true, “group”: null, “mode”: null, “original_basename”: “externaluserwebapi.war”, “owner”: null, “regexp”: null, “remote_src”: null, “selevel”: null, “serole”: null, “setype”: null, “seuser”: null, “src”: “/home/ec2-user/.ansible/tmp/ansible-tmp-1470673998.42-22221732776252/source”, “validate”: null}}, “md5sum”: “ba5224fb84a5f82d5fa7b8a8f83c4b2e”, “mode”: “0644”, “owner”: “root”, “size”: 17027813, “src”: “/home/ec2-user/.ansible/tmp/ansible-tmp-1470673998.42-22221732776252/source”, “state”: “file”, “uid”: 0}
Not sure why but copy module is not overriding the script in destination directory.I read that by default it is force=yes.Please help.