1 year ago
#385921
naeroy
Using Ansible to decrypt remote files?
Maybe it's a silly question but... I would like to have an Ansible task that simply decrypts some remote files that have been encrypted with ansible-vault
I had in mind to use the copy module with the option decrypt: yes
but it is not working for me because remote_src: yes
don't support decrypt: yes
Autodecryption of files does not work when remote_src=yes.
https://docs.ansible.com/ansible/2.9/modules/copy_module.html
Is there any other way to achieve this?
- name: Decrypting secrets
become: true
copy:
src: "{{ path }}"
dest: "{{ path }}"
owner: "{{ user }}"
group: "{{ user }}"
decrypt: yes
remote_src: yes
Ansible version --> 2.9
ansible
ansible-vault
0 Answers
Your Answer