Using HashiCorp Vault with the RedHat Ansible Automation Platform (AAP)

In the first steps post the SSH private key for the managed nodes was stored directly in an AAP credential. This post shows how to keep secrets like SSH keys, database passwords and repository tokens in HashiCorp Vault instead and how the RedHat Ansible Automation Platform (AAP) reads them at runtime with the credential type “HashiCorp Vault Secret Lookup”.

Vault is source-available under the Business Source License (BSL). Non-production use is allowed, and so is running Vault for your own organization, so the community edition is fine for a test environment. We install it on the AAP VM lin2 (RHEL 9.7), because at the time of writing the HashiCorp package repository has no packages for RHEL 10. To keep the setup simple, Vault stores its data in the local file system and listens on plain HTTP. In production we would use TLS, integrated storage (Raft) with several nodes and more than one unseal key.

Installing Vault

The following steps need to be run as root on lin2:

# add the HashiCorp repository and install Vault
dnf -y install dnf-plugins-core jq
dnf config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo
dnf -y install vault
vault version
# replace the default configuration (file storage, HTTP listener, web UI)
cp /etc/vault.d/vault.hcl /etc/vault.d/vault.hcl.orig
cat > /etc/vault.d/vault.hcl <<EOF
ui            = true
disable_mlock = true
api_addr      = "http://$(hostname):8200"

storage "file" {
  path = "/opt/vault/data"
}

listener "tcp" {
  address     = "0.0.0.0:8200"
  tls_disable = 1
}
EOF
# start Vault and open the port in the firewall
systemctl enable --now vault
systemctl status vault --no-pager
# our firewall is currently disabled
#firewall-cmd --permanent --add-port=8200/tcp
#firewall-cmd --reload
Sample Output (click to expand):
[root@lin2 ~]# # add the HashiCorp repository and install Vault
dnf -y install dnf-plugins-core jq
dnf config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo
dnf -y install vault
vault version
# replace the default configuration (file storage, HTTP listener, web UI)
cp /etc/vault.d/vault.hcl /etc/vault.d/vault.hcl.orig
cat > /etc/vault.d/vault.hcl <<EOF
ui            = true
disable_mlock = true
api_addr      = "http://$(hostname):8200"

storage "file" {
  path = "/opt/vault/data"
}

listener "tcp" {
  address     = "0.0.0.0:8200"
  tls_disable = 1
}
EOF
# start Vault and open the port in the firewall
systemctl enable --now vault
systemctl status vault --no-pager
# our firewall is currently disabled
#firewall-cmd --permanent --add-port=8200/tcp
#firewall-cmd --reload
Updating Subscription Management repositories.
Last metadata expiration check: 10:05:59 ago on Sat 05 Dec 2026 07:41:15 AM CET.
Package dnf-plugins-core-4.3.0-27.el9.noarch is already installed.
Package jq-1.6-21.el9_9.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
Updating Subscription Management repositories.
Adding repo from: https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo
Updating Subscription Management repositories.
Hashicorp Stable - x86_64                                                                            4.2 MB/s | 1.9 MB     00:00
Last metadata expiration check: 0:00:02 ago on Sat 05 Dec 2026 05:47:28 PM CET.
Dependencies resolved.
=====================================================================================================================================
 Package                      Architecture                  Version                           Repository                        Size
=====================================================================================================================================
Installing:
 vault                        x86_64                        2.2.2-1                           hashicorp                        180 M

Transaction Summary
=====================================================================================================================================
Install  1 Package

Total download size: 180 M
Installed size: 527 M
Downloading Packages:
vault-2.2.2-1.x86_64.rpm                                                                             9.9 MB/s | 180 MB     00:18
-------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                9.9 MB/s | 180 MB     00:18
Hashicorp Stable - x86_64                                                                             20 kB/s | 1.7 kB     00:00
Importing GPG key 0xCA026560:
 Userid     : "HashiCorp Security (HashiCorp Package Signing) <security+packaging@hashicorp.com>"
 Fingerprint: D55C 0D1A C78A 8D81 26CB 631C FC9C A96A CA02 6560
 From       : https://rpm.releases.hashicorp.com/gpg
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                             1/1
  Running scriptlet: vault-2.2.2-1.x86_64                                                                                        1/1
  Installing       : vault-2.2.2-1.x86_64                                                                                        1/1
  Running scriptlet: vault-2.2.2-1.x86_64                                                                                        1/1
Generating Vault TLS key and self-signed certificate...
.......+.+.........+.....+.......+......+...............+++++++++++++++++++++++++++++++++++++++++++++*........+.+..+...+...+.+......+...+............+..+...+.......+......+.....+.+++++++++++++++++++++++++++++++++++++++++++++*...........+......+....+...+........+...+++++
....+...+......+......+.......+........+.......+......+.....+.......+...+.....+.+........+......+.+...+.....+.............+.....+++++++++++++++++++++++++++++++++++++++++++++*.........+.....+......+....+........+.......+.................+......+...+.+......+..+.+.....+.+...+...+........+.+.....+....+.....+.+...+...+..+......+.......+.................+...+.........+...+.+..+..........+..+..........+......+.....+.+.....+...+...+.......+..+...+...+...+.+...+........+...+....+...+...+..+....+.....+.............+.....+++++++++++++++++++++++++++++++++++++++++++++*..+.........................+..+...+.+.....+.+...............+.....+.+.........+...+........+...............+.......+......+.........+........+....+.....+.+...+...........+....+..........................+.+..............+.+..+.+...........+...+.+......+...+...............+..+...+.............+...+..+...................+.........+..+.........+.............+......+.........+.....+.+......+........................+.....+.+...+.....+......+.+...+..+......+.........+......+..................+.......+.........+.....+.+........+.......+..+.+............+........+.+......+...+..............+.+..............+...+....+...+......+..+...+...............+...............+.+.................................+...+...+......+...........+...+....+...+........+.+..............+............+............+...+....+...+........+.......+............+...........+...+.........+.......+........+......+.+......+............+...+..+......+....+................................+......+....+......+.....+...+......+.........+.+.....+.+.........+......+........+....+........+.......+...+...+..+.........+....+.....+....+...+........+........................+.......+.....+.+++++
-----
Vault TLS key and self-signed certificate have been generated in '/opt/vault/tls'.

  Verifying        : vault-2.2.2-1.x86_64                                                                                        1/1
Installed products updated.

Installed:
  vault-2.2.2-1.x86_64

Complete!
Vault v2.2.2 (c56e7e670bd8c79104c27b6c10138226538a6db2), built 2026-11-11T13:53:02Z
Created symlink /etc/systemd/system/multi-user.target.wants/vault.service → /usr/lib/systemd/system/vault.service.
● vault.service - "HashiCorp Vault - A tool for managing secrets"
     Loaded: loaded (/usr/lib/systemd/system/vault.service; enabled; preset: disabled)
     Active: active (running) since Sat 2026-12-05 17:48:14 CET; 20ms ago
       Docs: https://developer.hashicorp.com/vault/docs
   Main PID: 4581 (vault)
      Tasks: 9 (limit: 100156)
     Memory: 25.7M (peak: 26.4M)
        CPU: 165ms
     CGroup: /system.slice/vault.service
             └─4581 /usr/bin/vault server -config=/etc/vault.d/vault.hcl

Dec 05 17:48:14 lin2.fritz.box vault[4581]:            Recovery Mode: false
Dec 05 17:48:14 lin2.fritz.box vault[4581]:                  Storage: file
Dec 05 17:48:14 lin2.fritz.box vault[4581]:                  Version: Vault v2.2.2, built 2026-11-11T13:53:02Z
Dec 05 17:48:14 lin2.fritz.box vault[4581]:              Version Sha: c56e7e670bd8c79104c27b6c10138226538a6db2
Dec 05 17:48:14 lin2.fritz.box vault[4581]: ==> Vault server started! Log data will stream in below:
Dec 05 17:48:14 lin2.fritz.box vault[4581]: 2026-12-05T17:48:14.429+0100 [INFO]  proxy environment: http_proxy="" https_pro…_proxy=""
Dec 05 17:48:14 lin2.fritz.box vault[4581]: 2026-12-05T17:48:14.430+0100 [INFO]  incrementing seal generation: generation=1
Dec 05 17:48:14 lin2.fritz.box vault[4581]: 2026-12-05T17:48:14.430+0100 [INFO]  core: Initializing version history cache for core
Dec 05 17:48:14 lin2.fritz.box vault[4581]: 2026-12-05T17:48:14.430+0100 [INFO]  events: Starting event system
Dec 05 17:48:14 lin2.fritz.box systemd[1]: Started "HashiCorp Vault - A tool for managing secrets".
Hint: Some lines were ellipsized, use -l to show in full.
[root@lin2 ~]#

Initializing and Unsealing Vault

A new Vault has to be initialized once. This creates the unseal key(s) and the root token. After every start Vault is sealed and must be unsealed with the unseal key before it can be used. For the test environment we use only one unseal key and store it together with the root token in a file. Never do this in production! The following steps are run as the user aap on lin2:

export VAULT_ADDR=http://$(hostname):8200
# initialize Vault with one unseal key (test environment only!)
vault operator init -key-shares=1 -key-threshold=1 -format=json > ~/vault_init.json
chmod 600 ~/vault_init.json
# unseal Vault (needed again after every restart of Vault or the VM)
vault operator unseal $(jq -r '.unseal_keys_b64[0]' ~/vault_init.json)
# log in with the root token
export VAULT_TOKEN=$(jq -r .root_token ~/vault_init.json)
vault status
Sample Output (click to expand):
[aap@lin2 ~]$ export VAULT_ADDR=http://$(hostname):8200
# initialize Vault with one unseal key (test environment only!)
vault operator init -key-shares=1 -key-threshold=1 -format=json > ~/vault_init.json
chmod 600 ~/vault_init.json
# unseal Vault (needed again after every restart of Vault or the VM)
vault operator unseal $(jq -r '.unseal_keys_b64[0]' ~/vault_init.json)
# log in with the root token
export VAULT_TOKEN=$(jq -r .root_token ~/vault_init.json)
vault status
Key             Value
---             -----
Seal Type       shamir
Initialized     true
Sealed          false
Total Shares    1
Threshold       1
Version         2.2.2
Build Date      2026-11-11T13:53:02Z
Storage Type    file
Cluster Name    vault-cluster-12d5d1f6
Cluster ID      07ff337b-2190-b164-ac9e-aff672f02c0d
HA Enabled      false
Key             Value
---             -----
Seal Type       shamir
Initialized     true
Sealed          false
Total Shares    1
Threshold       1
Version         2.2.2
Build Date      2026-11-11T13:53:02Z
Storage Type    file
Cluster Name    vault-cluster-12d5d1f6
Cluster ID      07ff337b-2190-b164-ac9e-aff672f02c0d
HA Enabled      false
[aap@lin2 ~]$

The web UI is now available with a URL similar to http://lin2.fritz.box:8200/ui (log in with the method “Token” and the root token).

HashiCorp Vault 2.2.2 web UI dashboard with file storage and TLS disabled

Storing the Secrets

We enable a key/value secrets engine (version 2, which keeps older versions of a secret) with the path lab and store three secrets: the SSH private key for the user ansible, a generated password for the EPAS superuser enterprisedb (used in the next post) and the token for the EDB package repository (replace the placeholder with your own token from the EDB repos page):

# run as aap on lin2
# enable the KV version 2 secrets engine
vault secrets enable -path=lab kv-v2
# the SSH private key (the @ reads the value from a file)
vault kv put lab/ssh/ansible private_key=@$HOME/.ssh/aap_lab
# a random password for the EPAS superuser
vault kv put lab/epas/enterprisedb username=enterprisedb password=$(openssl rand -base64 18)
# the token for the EDB repository
vault kv put lab/edb/repo token='<your EDB repository token>'
# check the secrets
vault kv list lab/epas
vault kv get lab/epas/enterprisedb
Sample Output (click to expand):
[aap@lin2 ~]$ # run as aap on lin2
# enable the KV version 2 secrets engine
vault secrets enable -path=lab kv-v2
# the SSH private key (the @ reads the value from a file)
vault kv put lab/ssh/ansible private_key=@$HOME/.ssh/aap_lab
# a random password for the EPAS superuser
vault kv put lab/epas/enterprisedb username=enterprisedb password=$(openssl rand -base64 18)
# the token for the EDB repository
vault kv put lab/edb/repo token='xxx'
# check the secrets
vault kv list lab/epas
vault kv get lab/epas/enterprisedb
Success! Enabled the kv-v2 secrets engine at: lab/
==== Secret Path ====
lab/data/ssh/ansible

======= Metadata =======
Key                Value
---                -----
created_time       2026-12-05T16:59:40.129849205Z
custom_metadata    <nil>
deletion_time      n/a
destroyed          false
version            1
======= Secret Path =======
lab/data/epas/enterprisedb

======= Metadata =======
Key                Value
---                -----
created_time       2026-12-05T16:59:40.231874587Z
custom_metadata    <nil>
deletion_time      n/a
destroyed          false
version            1
== Secret Path ==
lab/data/edb/repo

======= Metadata =======
Key                Value
---                -----
created_time       2026-12-05T16:59:40.336628893Z
custom_metadata    <nil>
deletion_time      n/a
destroyed          false
version            1
Keys
----
enterprisedb
======= Secret Path =======
lab/data/epas/enterprisedb

======= Metadata =======
Key                Value
---                -----
created_time       2026-12-05T16:59:40.231874587Z
custom_metadata    <nil>
deletion_time      n/a
destroyed          false
version            1

====== Data ======
Key         Value
---         -----
password    xxx
username    enterprisedb
[aap@lin2 ~]$

Creating an AppRole for AAP

AAP should not use the root token. Instead we create a policy which allows only to read the secrets below lab, and an AppRole with this policy. AAP logs in with the role_id and the secret_id of this AppRole and gets a short-lived token:

# run as aap on lin2
# policy: read-only access to the KV engine lab
vault policy write aap-read - <<'EOF'
path "lab/data/*" {
  capabilities = ["read"]
}
EOF
# enable the AppRole authentication and create the role for AAP
vault auth enable approle
vault write auth/approle/role/aap token_policies=aap-read token_ttl=1h token_max_ttl=4h
# get the role_id and create a secret_id
export VAULT_ROLE_ID=$(vault read -field=role_id auth/approle/role/aap/role-id)
export VAULT_SECRET_ID=$(vault write -f -field=secret_id auth/approle/role/aap/secret-id)
# test the login with the AppRole and read a secret with the new token
APPROLE_TOKEN=$(vault write -field=token auth/approle/login role_id=$VAULT_ROLE_ID secret_id=$VAULT_SECRET_ID)
VAULT_TOKEN=$APPROLE_TOKEN vault kv get -field=username lab/epas/enterprisedb
# writing must fail with "permission denied"
VAULT_TOKEN=$APPROLE_TOKEN vault kv put lab/test foo=bar
Sample Output (click to expand):
[aap@lin2 ~]$ # run as aap on lin2
# policy: read-only access to the KV engine lab
vault policy write aap-read - <<'EOF'
path "lab/data/*" {
  capabilities = ["read"]
}
EOF
# enable the AppRole authentication and create the role for AAP
vault auth enable approle
vault write auth/approle/role/aap token_policies=aap-read token_ttl=1h token_max_ttl=4h
# get the role_id and create a secret_id
export VAULT_ROLE_ID=$(vault read -field=role_id auth/approle/role/aap/role-id)
export VAULT_SECRET_ID=$(vault write -f -field=secret_id auth/approle/role/aap/secret-id)
# test the login with the AppRole and read a secret with the new token
APPROLE_TOKEN=$(vault write -field=token auth/approle/login role_id=$VAULT_ROLE_ID secret_id=$VAULT_SECRET_ID)
VAULT_TOKEN=$APPROLE_TOKEN vault kv get -field=username lab/epas/enterprisedb
# writing must fail with "permission denied"
VAULT_TOKEN=$APPROLE_TOKEN vault kv put lab/test foo=bar
Success! Uploaded policy: aap-read
Success! Enabled approle auth method at: approle/
Success! Data written to: auth/approle/role/aap
enterprisedb
Error writing data to lab/data/test: Error making API request.

URL: PUT http://lin2.fritz.box:8200/v1/lab/data/test
Code: 403. Errors:

* 1 error occurred:
        * permission denied


[aap@lin2 ~]$

Adding a Playbook to test the Secrets

The test playbook runs in the execution environment and shows the user name and the length of the secrets which AAP passes to the job, but never the secrets themselves:

# run as aap on lin2
cd ~/aap-demo
cat > playbooks/vault_test.yml <<'EOF'
---
- name: Check that the secrets from Vault arrive in the job
  hosts: localhost
  connection: local
  gather_facts: false
  tasks:
    - name: Show the user and the length of the secrets
      ansible.builtin.debug:
        msg: >-
          EPAS superuser: {{ epas_superuser }},
          password length: {{ epas_superuser_password | length }},
          EDB repository token length: {{ edb_repo_token | length }}
EOF
git add playbooks/vault_test.yml
git commit -m "Add Vault test playbook"
git push

Connecting AAP to Vault

Now we configure AAP as code again. The playbook config/aap_vault.yml creates a credential of the type “HashiCorp Vault Secret Lookup” with the AppRole data. The Machine credential “Lab SSH” no longer stores the private key; instead a credential input source reads the field ssh_key_data from Vault. For the EPAS password and the EDB token we create custom credential types whose injectors pass the values as extra variables to the playbooks. The metadata of an input source defines which secret is read: secret_backend is the path of the KV engine, secret_path the path of the secret and secret_key the key inside the secret.

# run as aap on lin2
cd ~/aap-demo
cat > config/aap_vault.yml <<'EOF'
---
- name: Connect AAP to HashiCorp Vault
  hosts: localhost
  connection: local
  gather_facts: false
  vars:
    org: JBITC
  tasks:
    - name: Create the Vault lookup credential
      ansible.controller.credential:
        name: Lab Vault
        organization: "{{ org }}"
        credential_type: HashiCorp Vault Secret Lookup
        inputs:
          url: "{{ lookup('ansible.builtin.env', 'VAULT_ADDR') }}"
          role_id: "{{ lookup('ansible.builtin.env', 'VAULT_ROLE_ID') }}"
          secret_id: "{{ lookup('ansible.builtin.env', 'VAULT_SECRET_ID') }}"
          default_auth_path: approle
          api_version: v2

    # ----- SSH key for the managed nodes -----
    - name: Machine credential without a stored private key
      ansible.controller.credential:
        name: Lab SSH
        organization: "{{ org }}"
        credential_type: Machine
        inputs:
          username: ansible
          become_method: sudo

    - name: Read the SSH private key from Vault
      ansible.controller.credential_input_source:
        input_field_name: ssh_key_data
        target_credential: Lab SSH
        source_credential: Lab Vault
        metadata:
          secret_backend: lab
          secret_path: ssh/ansible
          secret_key: private_key

    # ----- custom credential types -----
    - name: Credential type for the EPAS superuser
      ansible.controller.credential_type:
        name: EPAS Superuser
        kind: cloud
        inputs:
          fields:
            - {id: username, type: string, label: Username}
            - {id: password, type: string, label: Password, secret: true}
          required: [username]
        injectors:
          extra_vars:
            epas_superuser: !unsafe '{{ username }}'
            epas_superuser_password: !unsafe '{{ password }}'

    - name: Credential type for the EDB repository token
      ansible.controller.credential_type:
        name: EDB Repository
        kind: cloud
        inputs:
          fields:
            - {id: token, type: string, label: Repository Token, secret: true}
        injectors:
          extra_vars:
            edb_repo_token: !unsafe '{{ token }}'

    # ----- credentials which read their secrets from Vault -----
    - name: Create the EPAS superuser credential
      ansible.controller.credential:
        name: EPAS Superuser
        organization: "{{ org }}"
        credential_type: EPAS Superuser
        inputs:
          username: enterprisedb

    - name: Read the EPAS password from Vault
      ansible.controller.credential_input_source:
        input_field_name: password
        target_credential: EPAS Superuser
        source_credential: Lab Vault
        metadata:
          secret_backend: lab
          secret_path: epas/enterprisedb
          secret_key: password

    - name: Create the EDB repository credential
      ansible.controller.credential:
        name: EDB Repository
        organization: "{{ org }}"
        credential_type: EDB Repository
        inputs: {}

    - name: Read the EDB repository token from Vault
      ansible.controller.credential_input_source:
        input_field_name: token
        target_credential: EDB Repository
        source_credential: Lab Vault
        metadata:
          secret_backend: lab
          secret_path: edb/repo
          secret_key: token

    # ----- job template to test the secrets -----
    - name: Synchronize the project (new playbook in Git)
      ansible.controller.project_update:
        project: aap-demo
        wait: true
    - name: Create the test job template
      ansible.controller.job_template:
        name: Vault - Test Secrets
        organization: "{{ org }}"
        project: aap-demo
        playbook: playbooks/vault_test.yml
        inventory: Lab
        credentials: [EPAS Superuser, EDB Repository]

    - name: Launch the test job template
      ansible.controller.job_launch:
        job_template: Vault - Test Secrets
        wait: true

    - name: Launch OS - Show Info (the SSH key now comes from Vault)
      ansible.controller.job_launch:
        job_template: OS - Show Info
        wait: true
EOF
# the private key must not be written back by the first configuration playbook
sed -i '/ssh_key_data:/d' config/aap_config.yml
git add config
git commit -m "Read the secrets from HashiCorp Vault"
git push

We store the Vault address and the AppRole data in the file ~/aap_env.sh from the first post, so they are also available in a new shell (source ~/aap_env.sh). The SSH private key is removed from this file, because from now on AAP reads it from Vault. The helper function aap_play already passes the VAULT_* variables into the container. In the same shell where VAULT_ADDR, VAULT_ROLE_ID and VAULT_SECRET_ID were exported, run:

# store the Vault settings in the environment file and remove the SSH private key from it
sed -i '/AAP_LAB_KEY/d' ~/aap_env.sh
cat >> ~/aap_env.sh <<EOF
# HashiCorp Vault (AppRole for AAP)
export VAULT_ADDR=$VAULT_ADDR
export VAULT_ROLE_ID=$VAULT_ROLE_ID
export VAULT_SECRET_ID=$VAULT_SECRET_ID
EOF
unset AAP_LAB_KEY VAULT_TOKEN
source ~/aap_env.sh
aap_play config/aap_vault.yml
Sample Output (click to expand):
[aap@lin2 aap-demo]$ # store the Vault settings in the environment file and remove the SSH private key from it
sed -i '/AAP_LAB_KEY/d' ~/aap_env.sh
cat >> ~/aap_env.sh <<EOF
# HashiCorp Vault (AppRole for AAP)
export VAULT_ADDR=$VAULT_ADDR
export VAULT_ROLE_ID=$VAULT_ROLE_ID
export VAULT_SECRET_ID=$VAULT_SECRET_ID
EOF
unset AAP_LAB_KEY VAULT_TOKEN
source ~/aap_env.sh
aap_play config/aap_vault.yml
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that
the implicit localhost does not match 'all'

PLAY [Connect AAP to HashiCorp Vault] ******************************************

TASK [Create the Vault lookup credential] **************************************
changed: [localhost]

TASK [Machine credential without a stored private key] *************************
changed: [localhost]

TASK [Read the SSH private key from Vault] *************************************
changed: [localhost]

TASK [Credential type for the EPAS superuser] **********************************
changed: [localhost]

TASK [Credential type for the EDB repository token] ****************************
changed: [localhost]

TASK [Create the EPAS superuser credential] ************************************
changed: [localhost]

TASK [Read the EPAS password from Vault] ***************************************
changed: [localhost]

TASK [Create the EDB repository credential] ************************************
changed: [localhost]

TASK [Read the EDB repository token from Vault] ********************************
changed: [localhost]

TASK [Synchronize the project (new playbook in Git)] ***************************
changed: [localhost]

TASK [Create the test job template] ********************************************
changed: [localhost]

TASK [Launch the test job template] ********************************************
changed: [localhost]

TASK [Launch OS - Show Info (the SSH key now comes from Vault)] ****************
changed: [localhost]

PLAY RECAP *********************************************************************
localhost                  : ok=13   changed=13   unreachable=0    failed=0    skipped=0    rescued=0    ignored=0

[aap@lin2 aap-demo]$

In the GUI the field “SSH Private Key” of the credential “Lab SSH” no longer contains the key. Instead it shows “Value is managed by hashivault_kv: Lab Vault”, so AAP looks up the key in Vault every time a job runs. In the output of the job “Vault – Test Secrets” we see the user enterprisedb and the length of the password and the token.

AAP credential Lab SSH: the SSH private key is looked up from HashiCorp Vault (Lab Vault)

Output of the AAP job Vault - Test Secrets with the EPAS superuser and the lengths of the secrets

The next post uses the credentials “EPAS Superuser” and “EDB Repository” to install EDB Postgres Advanced Server with Failover Manager on lin6, lin7 and lin8. There we will also look at the database secrets engine of Vault, which creates short-lived database users on demand.

Have fun

0