Use value_name='service' in setup services task

This commit is contained in:
Sam A. 2022-11-26 22:13:51 +01:00
parent a89140ef51
commit e983499f9b
Signed by: samsapti
GPG key ID: CBBBE7371E81C4EA

View file

@ -4,11 +4,11 @@
name: external_services
- name: setup services
include_tasks: "services/{{ item.value.file }}"
loop: "{{ services | dict2items }}"
include_tasks: "services/{{ item.service.file }}"
loop: "{{ services | dict2items(value_name='service') }}"
when: single_service is not defined and
item.value.file is defined and
item.value.disabled_in_vagrant is not defined
item.service.file is defined and
item.service.disabled_in_vagrant is not defined
- name: setup single service
include_tasks: "services/{{ services[single_service].file }}"