Store and retrieve passwords from the keyring.
sudo apt install libsecret-tools
--label = Mainly for GUI programs but can be used to retrieve a given secret.{attribute} = Used by the secret-tool for retrieving or deleting a given secret.{value} = Used by the secret-tool for retrieving or deleting a given secret.secret-tool store --label='My Label' {attribute} {value} {attribute2} {value2} [...]
secret-tool lookup {attribute} {value} {attribute2} {value2} [...]
secret-tool search --all {attribute} {value} {attribute2} {value2} [...]
secret-tool clear {attribute} {value} {attribute2} {value2} [...]
secret-tool search --all {attribute} {value} [...]
Title:secret-tool search --all Title name
UserName:secret-tool search --all UserName name
URL:secret-tool search --all URL https://www.url.com
Notes:secret-tool search --all Notes value
~/.bash_aliases:alias get_password1='secret-tool lookup {attribute} {value} {attribute2} {value2}'
secret-tool store --label='Ansible Playbook' service ansible_playbook username <username>
admin_user: "username" ansible_become_pass: "{{ lookup('community.general.keyring', 'ansible_playbook {{ admin_user }}') }}"