The Akeyless Dev Hub

If you're looking for help with the only zero-trust, SaaS, unified platform for secrets management - you've come to the right place.

This is our documentation and updates center.

Documentation

Ansible Plugin - secret fetch via playbook using Ansible-playbook cli

Prerequisites

pip install hvac

Create Playbook

In the below example the name of the secret is test.

---
# This playbook fetches a secret from Akeyless Vault
- name: Echo
  hosts: all
  tasks:
   - name: Fetching a secret named test from Akeyless Vault
    debug:
      msg: "{{ lookup('hashi_vault', 'secret=secret/data/test:data') }}"

Set you Akeyless token in ~/.vault-token within your Ansible machine

Setting up Akeyless Vault:

export VAULT_ADDR=https://hvp.akeyless.io

Run Playbook

ansible-playbook -i <hostname>, -u ubuntu secret_fetch.yml

Updated 4 months ago

Ansible Plugin - secret fetch via playbook using Ansible-playbook cli


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.