Ansible vault key stored in another server

17 views
Skip to first unread message

Vignesh Srinivas

unread,
Feb 4, 2020, 4:44:12 PM2/4/20
to Ansible Project
Hi Team, 

My requirement is to store the vault key in another server, and as part of playbook execution, the ansible reads key value from remote server and decrypts the file on control server. I tried getting the key using modules like slurp and stored as a variable using set_fact. But how do I use it to decrypt the content? I tried something like this but didn't help, 

    - copy:
        src="{{vaultfile}}"
        dest="{{local_home}}/decrypted_vault.txt"
      environment: 
        ANSIBLE_VAULT_PASSWORD_FILE:{{key}}

Please advise. 

Reply all
Reply to author
Forward
0 new messages