Normalise distro package installation
This patch normalises the package installation selection variable name and jinja composure to be just a little cleaner. Change-Id: Iea02dcc6a05f6afd0f872ff9c68a33a8907fab1f
This commit is contained in:
parent
2d815fdc47
commit
fa848c609b
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
- name: Install neutron role packages
|
- name: Install neutron role packages
|
||||||
package:
|
package:
|
||||||
name: "{{ neutron_packages_list }}"
|
name: "{{ neutron_package_list }}"
|
||||||
state: "{{ neutron_package_state }}"
|
state: "{{ neutron_package_state }}"
|
||||||
update_cache: "{{ (ansible_pkg_mgr == 'apt') | ternary('yes', omit) }}"
|
update_cache: "{{ (ansible_pkg_mgr == 'apt') | ternary('yes', omit) }}"
|
||||||
cache_valid_time: "{{ (ansible_pkg_mgr == 'apt') | ternary(cache_timeout, omit) }}"
|
cache_valid_time: "{{ (ansible_pkg_mgr == 'apt') | ternary(cache_timeout, omit) }}"
|
||||||
|
@ -17,23 +17,28 @@
|
|||||||
### Packages
|
### Packages
|
||||||
###
|
###
|
||||||
|
|
||||||
neutron_packages_list: >
|
#
|
||||||
{% set packages = neutron_distro_packages -%}
|
# Compile a list of the distro packages to install based on
|
||||||
|
# whether the host is in the host group and the service is
|
||||||
|
# enabled.
|
||||||
|
#
|
||||||
|
neutron_package_list: |-
|
||||||
|
{% set packages = neutron_distro_packages %}
|
||||||
{% if (neutron_services['neutron-openvswitch-agent']['group'] in group_names and neutron_services['neutron-openvswitch-agent'].service_en | bool)
|
{% if (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-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['dragonflow-l3-agent']['group'] in group_names and neutron_services['dragonflow-l3-agent'].service_en | bool) %}
|
||||||
{% set _ = packages.extend(neutron_ovs_distro_packages) -%}
|
{% set _ = packages.extend(neutron_ovs_distro_packages) %}
|
||||||
{% endif -%}
|
{% endif %}
|
||||||
{% if neutron_services['neutron-linuxbridge-agent']['group'] in group_names and neutron_services['neutron-linuxbridge-agent'].service_en | bool -%}
|
{% if neutron_services['neutron-linuxbridge-agent']['group'] in group_names and neutron_services['neutron-linuxbridge-agent'].service_en | bool %}
|
||||||
{% set _ = packages.extend(neutron_lxb_distro_packages) -%}
|
{% set _ = packages.extend(neutron_lxb_distro_packages) %}
|
||||||
{% endif -%}
|
{% endif %}
|
||||||
{% if neutron_services['neutron-lbaasv2-agent']['group'] in group_names and neutron_lbaasv2 | bool -%}
|
{% if neutron_services['neutron-lbaasv2-agent']['group'] in group_names and neutron_lbaasv2 | bool %}
|
||||||
{% set _ = packages.extend(neutron_lbaas_distro_packages) -%}
|
{% set _ = packages.extend(neutron_lbaas_distro_packages) %}
|
||||||
{% endif -%}
|
{% endif %}
|
||||||
{% if neutron_services['neutron-vpnaas-agent']['group'] in group_names and neutron_vpnaas | bool -%}
|
{% if neutron_services['neutron-vpnaas-agent']['group'] in group_names and neutron_vpnaas | bool %}
|
||||||
{% set _ = packages.extend(neutron_vpnaas_distro_packages) -%}
|
{% set _ = packages.extend(neutron_vpnaas_distro_packages) %}
|
||||||
{% endif -%}
|
{% endif %}
|
||||||
{{ packages -}}
|
{{ packages }}
|
||||||
|
|
||||||
###
|
###
|
||||||
### Python code details
|
### Python code details
|
||||||
|
Loading…
x
Reference in New Issue
Block a user