summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
author7840vz <122374011+7840vz@users.noreply.github.com>2023-04-18 18:30:53 +0300
committerGitHub <noreply@github.com>2023-04-18 11:30:53 -0400
commit8d685b89f29dc7985b2c04b70c7c860bf09a632a (patch)
treeb99060349a23c252fabd4d936a0448f8c982df47 /lib
parent64fb64643d166cf3f544a9d1d43be8c96f20ef1d (diff)
downloadansible-8d685b89f29dc7985b2c04b70c7c860bf09a632a.tar.gz
Update validate_argument_spec.py (#80547)
##### SUMMARY Fix example with file lookup, filter 'from_yaml' is required. ##### ISSUE TYPE - Docs Pull Request +label: docsite_pr
Diffstat (limited to 'lib')
-rw-r--r--lib/ansible/modules/validate_argument_spec.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ansible/modules/validate_argument_spec.py b/lib/ansible/modules/validate_argument_spec.py
index e223c94689..744f1457b5 100644
--- a/lib/ansible/modules/validate_argument_spec.py
+++ b/lib/ansible/modules/validate_argument_spec.py
@@ -69,7 +69,7 @@ EXAMPLES = r'''
- name: verify vars needed for this task file are present when included, with spec from a spec file
ansible.builtin.validate_argument_spec:
- argument_spec: "{{lookup('ansible.builtin.file', 'myargspec.yml')['specname']['options']}}"
+ argument_spec: "{{(lookup('ansible.builtin.file', 'myargspec.yml') | from_yaml )['specname']['options']}}"
- name: verify vars needed for next include and not from inside it, also with params i'll only define there