From 8d685b89f29dc7985b2c04b70c7c860bf09a632a Mon Sep 17 00:00:00 2001 From: 7840vz <122374011+7840vz@users.noreply.github.com> Date: Tue, 18 Apr 2023 18:30:53 +0300 Subject: 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 --- lib/ansible/modules/validate_argument_spec.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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 -- cgit v1.2.1