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
This commit is contained in:
7840vz
2023-04-18 11:30:53 -04:00
committed by GitHub
parent 64fb64643d
commit 8d685b89f2
@@ -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