User Tools

Site Tools


linux:security:keyring:secret-tool

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
linux:security:keyring:secret-tool [2021/11/09 00:33] – [Usage] chucklinux:security:keyring:secret-tool [2021/11/14 16:59] (current) chuck
Line 1: Line 1:
 ======secret-tool====== ======secret-tool======
-Store and retrieve passwords from the keyring. 
  
  
 ---- ----
  
-===Description=== +=====Description===== 
-<WRAP green announcement smaller> +Store and retrieve passwords from the keyring.
-==From man secret-tool== +
-Each password is stored in an item. Items are uniquely identified by a set of attribute keys and values. When +
-storing a password you must specify unique pairs of attributes names and values, and when looking up a  +
-password you provide the same attribute name and value pairs. +
-</WRAP>+
  
 ---- ----
Line 68: Line 62:
 </code> </code>
   * Use in docker: https://www.marian-dan.ro/blog/storing-secrets-using-secret-tool/   * Use in docker: https://www.marian-dan.ro/blog/storing-secrets-using-secret-tool/
 +
 +----
 +
 +====Use keyring for Ansible====
 +  * Create keyring entry:<code bash>
 +secret-tool store --label='Ansible Playbook' service ansible_playbook username <username>
 +</code>
 +  * Create variable in playbook:<code yaml>
 +admin_user: "username"
 +ansible_become_pass: "{{ lookup('community.general.keyring', 'ansible_playbook {{ admin_user }}') }}"
 +</code>
 +  * https://docs.ansible.com/ansible/latest/collections/community/general/keyring_lookup.html
  
 ---- ----
linux/security/keyring/secret-tool.1636418032.txt.gz · Last modified: by chuck