Skip to content

vault-keyring-client script broken #3696

Description

@jlownie

At the very end of the documentation page for managing vault passwords is a reference to the vault-keyring-client script. This script is broken and in a repository that is archived and no longer maintained.

The script demonstrates how to get the vault password from the system keyring and is quite important for people that use this method to store the password.

Details of defect

The script worked fine previously but broke after a system update. When I tried to run it I got this error message:

ImportError: cannot import name \'get_ini_config_value\' from \'ansible.config.manager\' (/usr/lib/python3.14/site-packages/ansible/config/manager.py)

It looks like get_ini_config_value got dropped from that library. The library is ansible-core. The documentation says:

The Ansible API is intended for internal Ansible use. Ansible may make changes to this API at any time that could break backward compatibility with older versions of the API. Because of this, external use is not supported by Ansible

So calling this library in this context is not best practice and problems like this may happen again. An alternative to using this API is to use the ansible-config command.

If your password isn't stored in the config file then you can just delete the reference to get_ini_config_value in the import statement and also the block of code getting the values from the config file, and the script will work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    new_contributorThis PR is the first contribution by a new community member.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    🏗 In progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions