A while ago I posted about a nasty problem in the Ansible unarchive
module: in version 2.0.x, if you do not specify copy=no
, Ansible will happily copy the file again from the Ansible host.
Turns out, that problem was fixed in version 2.2, but now the Playbook runs into an error:
fatal: [xxx]: FAILED! => {"changed": false, "failed": true, "msg": "parameters are mutually exclusive: ('copy', 'remote_src')"}
Even if copy
is set to no
, Ansible no longer accepts both parameters.
Ok, let’s make Ansible happy, double the lines and add where conditions:
For older Ansible versions:
|
|
And for newer versions:
|
|