You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/integration/targets/module_defaults/test_templated_defaults.yml

26 lines
725 B
YAML

- hosts: localhost
gather_facts: no
tasks:
- name: ensure that individual module defaults expand correctly from a template
module_defaults:
ansible.builtin.ping: "{{ ping_defaults }}"
vars:
ping_defaults:
data: individual
ansible.builtin.ping:
register: individual_result
- name: ensure that group module defaults expand correctly from a template
module_defaults:
group/testgroup: "{{ testgroup_defaults }}"
vars:
testgroup_defaults:
data: group
ansible.builtin.ping:
register: group_result
- assert:
that:
- individual_result.ping == "individual"
- group_result.ping == "group"