mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-05-08 06:13:21 +00:00
Merge pull request #386 from rjeffman/docs_add_nolog_notice_to_vault
Add note about `no_log` use on vault data retrieve.
This commit is contained in:
@@ -130,7 +130,7 @@ Example playbook to make sure vault data is present in a symmetric vault:
|
||||
action: member
|
||||
```
|
||||
|
||||
Example playbook to retrieve vault data from a symmetric vault:
|
||||
When retrieving data from a vault, it is recommended that `no_log: yes` is used, so that sensitive data stored in a vault is not logged by Ansible. The data is returned in a dict `vault`, in the field `data` (e.g. `result.vault.data`). An example playbook to retrieve data from a symmetric vault:
|
||||
|
||||
```yaml
|
||||
---
|
||||
@@ -139,12 +139,19 @@ Example playbook to retrieve vault data from a symmetric vault:
|
||||
become: true
|
||||
|
||||
tasks:
|
||||
- ipavault:
|
||||
- name: Retrieve data from vault and register it in 'ipavault'
|
||||
ipavault:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
name: symvault
|
||||
username: admin
|
||||
password: SomeVAULTpassword
|
||||
state: retrieved
|
||||
no_log: yes
|
||||
register: ipavault
|
||||
|
||||
- name: Print retrieved data from vault
|
||||
debug:
|
||||
var: ipavault.vault.data
|
||||
```
|
||||
|
||||
Example playbook to make sure vault data is absent in a symmetric vault:
|
||||
|
||||
@@ -13,5 +13,6 @@
|
||||
private_key_file: private.pem
|
||||
state: retrieved
|
||||
register: result
|
||||
no_log: true
|
||||
- debug:
|
||||
msg: "Data: {{ result.vault.data }}"
|
||||
|
||||
@@ -13,5 +13,6 @@
|
||||
password: SomeVAULTpassword
|
||||
state: retrieved
|
||||
register: result
|
||||
no_log: true
|
||||
- debug:
|
||||
msg: "{{ result.vault.data }}"
|
||||
|
||||
Reference in New Issue
Block a user