I have a problem with Ansible Vault.
Vault on file copy commands works perfect, but I can´t find any solution to get encrypted templates to work.
My goal is to deploy an SSH key to authorized_keys
with some comments on top, with {{ ansible_managed }}
on top, but Ansible just creates the file encrypted on target host.
My task:
- name: Copy public RSA key
template: src=id_rsa.pub.j2 dest=/root/.ssh/authorized_keys owner=root mode=600
Result on target server:
$ANSIBLE_VAULT;1.1;AES256
66393735343333616637383238643132646134343235633662663262353530663133386439356334
6437633863333434393333336336396239636531306262640a623764303165333035633333643631
6631613234346133386261343162653931643865633139[...]
Has anyone tried the same and got it up and running?