diff --git a/tasks/main.yml b/tasks/main.yml index 56fa7ff3..ed586ff8 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -41,19 +41,6 @@ tags: - always -- name: Set filtered dictionary of neutron services - set_fact: - filtered_neutron_services: > - {%- set services = neutron_services.copy() %} - {%- for key,value in neutron_services.items() %} - {%- if value.group not in group_names or not value.service_en %} - {%- set _ = services.pop(key) %} - {%- endif %} - {%- endfor %} - {{- services -}} - tags: - - always - - include: neutron_ml2_ovs_powervm.yml static: no when: diff --git a/vars/main.yml b/vars/main.yml index 73afe9a6..27efa85d 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -24,3 +24,12 @@ neutron_packages_list: enabled: "{{ neutron_services['neutron-lbaasv2-agent']['group'] in group_names and neutron_lbaasv2 | bool }}" - packages: "{{ neutron_vpnaas_distro_packages }}" enabled: "{{ neutron_services['neutron-vpnaas-agent']['group'] in group_names and neutron_vpnaas | bool }}" + +filtered_neutron_services: > + {%- set services = neutron_services.copy() %} + {%- for key,value in neutron_services.items() %} + {%- if value.group not in group_names or not value.service_en %} + {%- set _ = services.pop(key) %} + {%- endif %} + {%- endfor %} + {{- services -}}