community / community.general / 6.6.8 / module / keyring Set or delete 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 (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 set or delete passphrases for a given service and username from the OS' native keyring.
- name: Set a password for test/test1 community.general.keyring: service: test username: test1 user_password: "{{ user_password }}" keyring_password: "{{ keyring_password }}"
- name: Delete the password for test/test1 community.general.keyring: service: test username: test1 user_password: "{{ user_password }}" keyring_password: "{{ keyring_password }}" state: absent
state: choices: - present - absent default: present description: Whether the password should exist. required: false type: str service: description: The name of the service. required: true type: str username: description: The user belonging to the service. required: true type: str user_password: aliases: - password description: The password to set. required: false type: str keyring_password: description: Password to unlock keyring. required: true type: str