ansible.builtin.vaulted_file test – Is this file an encrypted vault

Note

This test plugin is part of ansible-core and included in all Ansible installations. In most cases, you can use the short plugin name vaulted_file. However, we recommend you use the Fully Qualified Collection Name (FQCN) ansible.builtin.vaulted_file for easy linking to the plugin documentation and to avoid conflicting with other collections that may have the same test plugin name.

New in ansible-core 2.18

Synopsis

  • Verifies if the input path is an Ansible vault file.

Input

This describes the input of the test, the value before is ansible.builtin.vaulted_file or is not ansible.builtin.vaulted_file.

Parameter

Comments

Input

path / required

The path to the possible vault.

Examples

thisisfalse: '{{ "/etc/hosts" is vaulted_file}}'
thisistrue: '{{ "/path/to/vaulted/file" is vaulted_file}}'

Return Value

Key

Description

Return value

boolean

Returns True if the path is a valid ansible vault, False otherwise.

Returned: success

Authors

  • Ansible Core

Hint

Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.