Skip to content

Rundeck fails to parse Ansible inventory YAML containing !vault-encrypted variables #412

@kedar9696

Description

@kedar9696

Describe the bug
When using an Ansible YAML inventory that contains Ansible Vault-encrypted values (e.g., using !vault), Rundeck fails to parse the file and throws the following error:

Cannot load yaml data coming from Ansible: could not determine a constructor for the tag !vault in 'string', line XX, column XX: <vault_field>: !vault |

This prevents Rundeck from loading the node source from Ansible inventories when Vault is used.


My Rundeck detail

  • Rundeck version: 5.12.0
  • Install type: rpm
  • OS Name/version: Ubuntu 22.04.4 LTS (Jammy Jellyfish)
  • DB Type/version: H2
  • Python Version : Python 3.10.12
  • Ansible Version : ansible [core 2.17.3]

To Reproduce
Steps to reproduce the behavior:

  1. Create an Ansible inventory YAML file that includes Vault-encrypted fields (e.g., !vault)
  2. Configure a project in Rundeck to use the Ansible Resource Model Source with the inventory file
  3. Navigate to Project Settings > Edit Nodes
  4. Error appears indicating failure to parse !vault tag

Expected behavior
Rundeck should either:

  • Recognize the !vault tag and skip decryption if not required
  • Or support vault decryption via integration with ansible-vault or proper configuration
  • Or fail gracefully with a clear indication that Vault-encrypted variables are unsupported

Screenshots

Image


Additional context

  • This issue occurs across multiple Rundeck versions (not just 5.12.0), indicating a longstanding limitation with YAML parsing and Ansible Vault.
  • Using !vault is common in secure Ansible workflows; it would be helpful if Rundeck offered an option to support this or allow integration with a decrypt method.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions