feat(api_config): force an empty list if not config

!1
This commit is contained in:
2023-07-29 12:48:24 +09:30
parent 910663eb19
commit baf086de64

View File

@ -17,16 +17,14 @@
file: api/excluded_config.yaml
- name: Config
- name: Add/Update GLPI Config
ansible.builtin.include_tasks:
file: api/config.yaml
when: >
item.api_path == 'Config'
and
not sub_item.name in skip_config
and
sub_item.value is defined
loop: "{{ item_body }}"
loop: "{% if item.api_path == 'Config' %}{{ item_body }}{% else %}{{ [] }}{% endif %}"
loop_control:
loop_var: sub_item
vars: