ansible.builtin.vault_encrypted test – Is this 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 vault_encrypted. However, we recommend you use the Fully Qualified Collection Name (FQCN) ansible.builtin.vault_encrypted 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-base 2.10

Synopsis

  • Verifies if the input is an Ansible vault.

Input

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

Parameter

Comments

Input

string / required

The possible vault.

Examples

thisisfalse: '{{ "any string" is ansible_vault }}'
thisistrue: '{{ "$ANSIBLE_VAULT;1.2;AES256;dev...." is ansible_vault }}'

Return Value

Key

Description

Return value

boolean

Returns True if the input 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.