---
updatedAt: 2026-02-24T21:23:10.000Z
agentTools:
  projectIndex: https://docs.akeyless.io/llms.txt
---

# Ansible AWX Plugin - secret fetch by way of playbook using Universal Identity

Below, please find an example of using Ansible AWX with Akeyless Platform for fetching credentials, utilizing Akeyless [Universal Identity](https://docs.akeyless.io/docs/auth-with-universal-identity).

## Prerequisites

The section refers to changes that should be done in the awx machine (awx-task container).

1. Set akeyless-vault url in: VAULT\_ADDR environment variable:

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

2. You’ll need to configure the Akeyless temporary API token (this is the recommended and the more secure method). For token rotation, please [read more here](https://docs.akeyless.io/docs/auth-with-universal-identity). The rotated token should be saved in this file `/var/lib/awx/.vault-token`

## Configuring AWX Plugin

To use the vault plugin, complete the following procedure:

1. Download [this plugin](https://github.com/TerryHowe/ansible-modules-hashivault) and add it to your lookup\_plugins directory as described in the link.

2. Create a new template, according to the below:

   ![Configuring the AWX Plugin](https://files.readme.io/a66da1f-image.png)

   ![Configuring the AWX Plugin](https://files.readme.io/7f88aa4-image_2.png)

After successful job launch you will see the following:

![Configuring the AWX Plugin](https://files.readme.io/fdcc990-image_1.png)

For an additional ways to work with Ansible AWX, see [Ansible AWX Plugin - secret fetch by way of playbook](https://docs.akeyless.io/docs/ansible-awx-plugin).