I want to fetch/download files from a remote server with Ansible. I can use fetch
or synchronize
modules, but they don't support encryption with password. Is it possible with Ansible to download files in encrypted form?
Edit:
Looks like I couldn't clarify my question well (this question is on hold currently).
I want to download conf files from a remote computer. I can download them in one of two ways, fetch
or synchronize
modules like this:
- fetch:
src: /remote/path/to/single/file
dest: /local/path/to/save/file
flat: yes
- name: Synchronization of src on the control machine to dest on the remote hosts
synchronize:
src: some/relative/path
dest: /some/absolute/path
Neither approach supports password protection to transfer over the network. As the first answer stated below, SSH uses encryption already, but I'm wanting extra security with a password. I couldn't find how to do that with Ansible.
I wanted to know if there is a way to add password protection using Ansible, or if encrypting files on the remote server using other tools and then copying with Ansible to local, and then decrypting it again manually is necessary?