diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 16:04:21 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 16:04:21 +0000 |
commit | 8a754e0858d922e955e71b253c139e071ecec432 (patch) | |
tree | 527d16e74bfd1840c85efd675fdecad056c54107 /lib/ansible/plugins/filter/mandatory.yml | |
parent | Initial commit. (diff) | |
download | ansible-core-8a754e0858d922e955e71b253c139e071ecec432.tar.xz ansible-core-8a754e0858d922e955e71b253c139e071ecec432.zip |
Adding upstream version 2.14.3.upstream/2.14.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lib/ansible/plugins/filter/mandatory.yml')
-rw-r--r-- | lib/ansible/plugins/filter/mandatory.yml | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/ansible/plugins/filter/mandatory.yml b/lib/ansible/plugins/filter/mandatory.yml new file mode 100644 index 0000000..5addf15 --- /dev/null +++ b/lib/ansible/plugins/filter/mandatory.yml @@ -0,0 +1,21 @@ +DOCUMENTATION: + name: mandatory + version_added: "historical" + short_description: make a variable's existance mandatory + description: + - Depending on context undefined variables can be ignored or skipped, this ensures they force an error. + positional: _input + options: + _input: + description: Mandatory expression. + type: raw + required: true +EXAMPLES: | + + # results in a Filter Error + {{ notdefined | mandatory }} + +RETURN: + _value: + description: The input if defined, otherwise an error. + type: raw |