diff --git a/tasks/neutron_install.yml b/tasks/neutron_install.yml index 922a0527..a42ebf0e 100644 --- a/tasks/neutron_install.yml +++ b/tasks/neutron_install.yml @@ -185,4 +185,4 @@ name: "{{ neutron_ovs_service_name }}" state: started enabled: yes - when: neutron_needs_openvswitch + when: neutron_needs_openvswitch | bool diff --git a/vars/main.yml b/vars/main.yml index d2c69526..32814dc5 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -16,10 +16,11 @@ ### ### Open vSwitch ### -neutron_needs_openvswitch: (neutron_services['neutron-openvswitch-agent']['group'] in group_names and neutron_services['neutron-openvswitch-agent'].service_en | bool) - or (neutron_services['dragonflow-controller-agent']['group'] in group_names and neutron_services['dragonflow-controller-agent'].service_en | bool) - or (neutron_services['dragonflow-l3-agent']['group'] in group_names and neutron_services['dragonflow-l3-agent'].service_en | bool) - or ((neutron_services['neutron-server']['group'] not in group_names) and neutron_plugin_type == 'ml2.opendaylight') +neutron_needs_openvswitch: >- + {{ (neutron_services['neutron-openvswitch-agent']['group'] in group_names and neutron_services['neutron-openvswitch-agent'].service_en | bool) + or (neutron_services['dragonflow-controller-agent']['group'] in group_names and neutron_services['dragonflow-controller-agent'].service_en | bool) + or (neutron_services['dragonflow-l3-agent']['group'] in group_names and neutron_services['dragonflow-l3-agent'].service_en | bool) + or ((neutron_services['neutron-server']['group'] not in group_names) and neutron_plugin_type == 'ml2.opendaylight') }} ### ### Packages @@ -32,7 +33,7 @@ neutron_needs_openvswitch: (neutron_services['neutron-openvswitch-agent']['group # neutron_package_list: |- {% set packages = neutron_distro_packages %} - {% if neutron_needs_openvswitch %} + {% if neutron_needs_openvswitch | bool %} {% if (ovs_nsh_support and ansible_pkg_mgr in ['apt', 'zypper']) %} {% set _ = packages.extend(neutron_ovs_nsh_required_packages) %} {% else %}