neutron_needs_openvswitch should be jinja, not a string
In I4ec4fc2c2124a941f24478cbdf39ed34c0dce56f the long conditional set was broken out into its own variable to make it easier to grok, but the new variable was not wrapped in jinja braces, so it's evaluated as a string instead of jinja to interpret. Also, all conditionals that use the variable should be checking for a boolean value. Right now it might just consider the result true because the variable exists, rather than the value of the variable. Change-Id: Ic5210d62412ccf08e7d71860159aaaf37be9ddfd
This commit is contained in:
parent
90a567872f
commit
6341bbe743
@ -185,4 +185,4 @@
|
|||||||
name: "{{ neutron_ovs_service_name }}"
|
name: "{{ neutron_ovs_service_name }}"
|
||||||
state: started
|
state: started
|
||||||
enabled: yes
|
enabled: yes
|
||||||
when: neutron_needs_openvswitch
|
when: neutron_needs_openvswitch | bool
|
||||||
|
@ -16,10 +16,11 @@
|
|||||||
###
|
###
|
||||||
### Open vSwitch
|
### Open vSwitch
|
||||||
###
|
###
|
||||||
neutron_needs_openvswitch: (neutron_services['neutron-openvswitch-agent']['group'] in group_names and neutron_services['neutron-openvswitch-agent'].service_en | bool)
|
neutron_needs_openvswitch: >-
|
||||||
or (neutron_services['dragonflow-controller-agent']['group'] in group_names and neutron_services['dragonflow-controller-agent'].service_en | bool)
|
{{ (neutron_services['neutron-openvswitch-agent']['group'] in group_names and neutron_services['neutron-openvswitch-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['dragonflow-controller-agent']['group'] in group_names and neutron_services['dragonflow-controller-agent'].service_en | bool)
|
||||||
or ((neutron_services['neutron-server']['group'] not in group_names) and neutron_plugin_type == 'ml2.opendaylight')
|
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
|
### Packages
|
||||||
@ -32,7 +33,7 @@ neutron_needs_openvswitch: (neutron_services['neutron-openvswitch-agent']['group
|
|||||||
#
|
#
|
||||||
neutron_package_list: |-
|
neutron_package_list: |-
|
||||||
{% set packages = neutron_distro_packages %}
|
{% 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']) %}
|
{% if (ovs_nsh_support and ansible_pkg_mgr in ['apt', 'zypper']) %}
|
||||||
{% set _ = packages.extend(neutron_ovs_nsh_required_packages) %}
|
{% set _ = packages.extend(neutron_ovs_nsh_required_packages) %}
|
||||||
{% else %}
|
{% else %}
|
||||||
|
Loading…
Reference in New Issue
Block a user