|
|
|
@ -51,7 +51,7 @@ attributes:
|
|
|
|
|
EXAMPLES = r'''
|
|
|
|
|
- name: verify vars needed for this task file are present when included
|
|
|
|
|
ansible.builtin.validate_argument_spec:
|
|
|
|
|
argument_spec: '{{required_data}}'
|
|
|
|
|
argument_spec: '{{ required_data }}'
|
|
|
|
|
vars:
|
|
|
|
|
required_data:
|
|
|
|
|
# unlike spec file, just put the options in directly
|
|
|
|
@ -68,13 +68,13 @@ 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') | from_yaml )['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
|
|
|
|
|
block:
|
|
|
|
|
- ansible.builtin.validate_argument_spec:
|
|
|
|
|
argument_spec: "{{lookup('ansible.builtin.file', 'nakedoptions.yml'}}"
|
|
|
|
|
argument_spec: "{{ lookup('ansible.builtin.file', 'nakedoptions.yml') }}"
|
|
|
|
|
provided_arguments:
|
|
|
|
|
but: "that i can define on the include itself, like in it's `vars:` keyword"
|
|
|
|
|
|
|
|
|
|