mirror of https://github.com/ansible/ansible.git
Add vaulted_file test (#83717)
* Add vaulted_file test * fix is_encrypted_file while we are here Co-authored-by: Martin Krizek <martin.krizek@gmail.com>pull/83756/head
parent
97a60c1e86
commit
797e6bb220
@ -0,0 +1,5 @@
|
||||
bugfixes:
|
||||
- vault.is_encrypted_file is now optimized to be called in runtime and not for being called in tests
|
||||
- vault_encrypted test documentation, name and examples have been fixed, other parts were clarified
|
||||
minor_changes:
|
||||
- vaulted_file test filter added, to test if the provided path is an 'Ansible vaulted' file
|
@ -0,0 +1,19 @@
|
||||
DOCUMENTATION:
|
||||
name: vaulted_file
|
||||
author: Ansible Core
|
||||
version_added: "2.18"
|
||||
short_description: Is this file an encrypted vault
|
||||
description:
|
||||
- Verifies if the input path is an Ansible vault file.
|
||||
options:
|
||||
_input:
|
||||
description: The path to the possible vault.
|
||||
type: path
|
||||
required: True
|
||||
EXAMPLES: |
|
||||
thisisfalse: '{{ "/etc/hosts" is vaulted_file}}'
|
||||
thisistrue: '{{ "/path/to/vaulted/file" is vaulted_file}}'
|
||||
RETURN:
|
||||
_value:
|
||||
description: Returns V(True) if the path is a valid ansible vault, V(False) otherwise.
|
||||
type: boolean
|
@ -0,0 +1 @@
|
||||
this is not a vault!!!
|
@ -0,0 +1,6 @@
|
||||
$ANSIBLE_VAULT;1.1;AES256
|
||||
36383565336439373638626535313963373838613433343434663465656531316530663865363434
|
||||
3137636638393164646537643034303962633365613463310a303164353037663062376539313834
|
||||
65303131346266643934306364653063663061326165323737666636633363383337393731613030
|
||||
3164613334616465620a386234323862623764363834336364336662313932633866303262646565
|
||||
3861
|
@ -0,0 +1,6 @@
|
||||
$ANSIBLE_VAULT;1.2;AES256;yolo
|
||||
61303130346664303063346433663231333561616535623536613465663137626332633339326666
|
||||
3565393632323837663930656461643266663634643332300a343030333136353966636537326537
|
||||
36383536386164373565636335316436316538313135346264383561316333386461343262323766
|
||||
6335663033373666370a316432313733303338363936313364663532313335383239646561313864
|
||||
6663
|
Loading…
Reference in New Issue