ansible.utils/tests/integration/targets/utils_get_path/tasks/argspec.yaml

33 lines
648 B
YAML

---
- ansible.builtin.set_fact:
a:
b:
c:
d:
- 0
- 1
- name: Check argspec validation with filter
ansible.builtin.set_fact:
_result: "{{ a|ansible.utils.get_path() }}"
ignore_errors: true
register: result
- assert:
that: "{{ msg in result.msg }}"
vars:
msg: "missing required arguments: path"
- name: Check argspec validation with lookup
ansible.builtin.set_fact:
_result: "{{ lookup('ansible.utils.get_path') }}"
ignore_errors: true
register: result
- assert:
that: "{{ item in result.msg }}"
loop:
- "missing required arguments:"
- path
- var