ansible-edda/plays/services/roles/include/vars/group.yml

10 lines
415 B
YAML

services_all_services: "{{
services_all_hosts | map('extract', hostvars, 'services_host_services') | map('dict2items') |
flatten | items2dict }}"
services_rproxy_add_hosts: "\
{% set add_host_list = [] %}\
{% for service in ( services_all_services | dict2items ) %}\
{{ add_host_list.append('--add-host-' ~ service.key ~ ':' ~ service.value.address) }}\
{% endfor %}\
{{ add_host_list | join(' ') }}"