The copy module now does this seamlessly as of Ansible 2.1.x. Just encrypt your file with Ansible Vault and then issue the copy task on the file.
(For reference, here’s the feature that added this: https://github.com/ansible/ansible/pull/15417)
The copy module now does this seamlessly as of Ansible 2.1.x. Just encrypt your file with Ansible Vault and then issue the copy task on the file.
(For reference, here’s the feature that added this: https://github.com/ansible/ansible/pull/15417)