Debian Codegraph @

test/integration/targets/play_arg_spec/playbooks/module_defaults.yml

raw
1 - name: "Test validate_argspec and module_defaults interaction"
2 hosts: localhost
3 module_defaults:
4 validate_argument_spec:
5 provided_arguments: |
6 {% set defined_vars = {} %}
7 {% set ignore = ['group_names', 'groups', 'inventory_hostname', 'inventory_hostname_short', 'playbook_dir'] %}
8 {% for key, value in hostvars[inventory_hostname].items() %}
9 {% if value is defined and not (key is search("^ansible_.*$") or key in ignore) %}
10 {% set _ = defined_vars.update({key: value}) %}
11 {% endif %}
12 {% endfor %}
13 {{ defined_vars }}
14 gather_facts: no
15 validate_argspec: True