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:
Thomas Woerner
2020-10-28 16:19:45 +01:00
committed by GitHub
3 changed files with 11 additions and 2 deletions

View File

@@ -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:

View File

@@ -13,5 +13,6 @@
private_key_file: private.pem
state: retrieved
register: result
no_log: true
- debug:
msg: "Data: {{ result.vault.data }}"

View File

@@ -13,5 +13,6 @@
password: SomeVAULTpassword
state: retrieved
register: result
no_log: true
- debug:
msg: "{{ result.vault.data }}"