semaphore
semaphore copied to clipboard
Question: How do I access Key Store Keys in a playbook?
Question
I have created a Key in the Keystore for a db-user-password and picked login with password while keeping the optional Login empty.
Now I need to access this key through a var in a Playbook to connect to a database. The documentation is not showing how to do that, also #919 and #972 explain how to store it in the UI, but not how to reference the Key in a playbook.
Is this even possible?
I tried something like:
- name: Key Store access
hosts: my_host
tasks:
- name: print key
debug:
msg: "{{ lookup('env', 'SECRET_KEY') }}"
Related to
Documentation
Same problem. We want to securely distribute ssh private keys across numerous servers. But stuck with unclear vault use cases.