Add state retrieved to ipavault to retrieve vault stored data.

This patch adds support for retrieving data stored in an IPA vault by
adding a new valid state for ipavault: `retrieved`.

To allow the retrieval of data from assymetric vaults, the attributes
`private_key`, `private_key_files` and `out` were also added to the
module.

The private key files, `private.pem`, should be paired with the already
existing `public.pem` public key files.

Tests were updated to reflect changes and two new playbooks were added:

    playbooks/vault/retrive-data-asymmetric-vault.yml
    playbooks/vault/retrive-data-symmetric-vault.yml
This commit is contained in:
Rafael Guterres Jeffman
2020-05-18 18:08:34 -03:00
parent 0456424821
commit 0bcb4eaf0f
5 changed files with 169 additions and 133 deletions

View File

@@ -1,8 +1,8 @@
---
- name: Tests
hosts: ipaserver
become: true
gather_facts: True
become: no
gather_facts: no
tasks:
- name: Retrieve data from symmetric vault.
@@ -11,8 +11,7 @@
name: symvault
username: admin
password: SomeVAULTpassword
retrieve: yes
action: member
state: retrieved
register: result
- debug:
msg: "{{ result.data | b64decode }}"