Add diff mode support to hashivault_pki_role and update options list #484
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As in the title, allows to run the playbooks with
--diff --check
combination to see what the changes would be without actually applying them.While at it also updates the list of supported options, based on Vault API docs.
The tricky part here is that "durations" sent to Vault are required to be strings, while GET responses return integers.
Thus a temporary "view" of the desired state is created to converge on the same format.
Reuses (and moves to
module_utils
) theparse_duration
function originally introduced in 721fd55 . The temporary object is necessary here as Vault API doesn't officially support POSTing integers for this endpoint.