When copying a (on the remote host non-existing) ansible-vault encrypted file with the copy module everything works fine and the copied file is encrypted (as it should be).
When the file already exists however, an error is thrown.
TASK [Copy vault-encrypted file] **********************************************************************************
changed: [my.server.com]
TASK [Copy vault-encrypted file] **********************************************************************************
ok: [my.server.com]
TASK [Copy vault-encrypted file] **********************************************************************************
changed: [my.server.com]
TASK [Copy vault-encrypted file] **********************************************************************************
fatal: [my.server.com]: FAILED! => {"changed": false, "checksum": "e88caee4fa8e6e905552d564e3d884097d8c67eb", "failed": true, "msg": "Unsupported parameters for (file) module: decrypt Supported parameters include: attributes,backup,content,delimiter,diff_peek,directory_mode,follow,force,group,mode,original_basename,owner,path,recurse,regexp,remote_src,selevel,serole,setype,seuser,src,state,unsafe_writes,validate"}
ISSUE TYPE
COMPONENT NAME
Module: Copy
Option: decrypt: no #new in version 2.4.
ANSIBLE VERSION
OS / ENVIRONMENT
N/A
SUMMARY
When copying a (on the remote host non-existing) ansible-vault encrypted file with the copy module everything works fine and the copied file is encrypted (as it should be).
When the file already exists however, an error is thrown.
STEPS TO REPRODUCE
Run the following task twice to reproduce
EXPECTED RESULTS
ACTUAL RESULTS