community / community.general / 6.6.8 / module / keyring_info Get a passphrase using the Operating System's native keyring | "added in version" 5.2.0 of community.general" Authors: Alexander Hussey (@ahussey-redhat)community.general.keyring_info (6.6.8) — module
Install with ansible-galaxy collection install community.general:==6.6.8
collections: - name: community.general version: 6.6.8
This module uses the L(keyring Python library, https://pypi.org/project/keyring/) to retrieve passphrases for a given service and username from the OS' native keyring.
- name: Retrieve password for service_name/user_name community.general.keyring_info: service: test username: test1 keyring_password: "{{ keyring_password }}" register: test_password
- name: Display password ansible.builtin.debug: msg: "{{ test_password.passphrase }}"
service: description: The name of the service. required: true type: str username: description: The user belonging to the service. required: true type: str keyring_password: description: Password to unlock keyring. required: true type: str
passphrase: description: A string containing the password. returned: success and the password exists sample: Password123 type: str