semaphore icon indicating copy to clipboard operation
semaphore copied to clipboard

Question: How do I access Key Store Keys in a playbook?

Open MichaelMrt opened this issue 1 year ago • 1 comments

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

MichaelMrt avatar Jun 19 '24 11:06 MichaelMrt

Same problem. We want to securely distribute ssh private keys across numerous servers. But stuck with unclear vault use cases.

timteka avatar Jul 18 '24 10:07 timteka