Merge "More flexible neutron_package_list"
This commit is contained in:
commit
c2bc213e4a
@ -15,14 +15,10 @@
|
||||
|
||||
- name: Install neutron role packages
|
||||
package:
|
||||
name: "{{ item }}"
|
||||
name: "{{ neutron_packages_list }}"
|
||||
state: "{{ neutron_package_state }}"
|
||||
update_cache: "{{ (ansible_pkg_mgr == 'apt') | ternary('yes', omit) }}"
|
||||
cache_valid_time: "{{ (ansible_pkg_mgr == 'apt') | ternary(cache_timeout, omit) }}"
|
||||
with_items:
|
||||
- "{{ neutron_packages_list | selectattr('enabled') | sum(attribute='packages', start=[]) }}"
|
||||
when:
|
||||
- item != ''
|
||||
|
||||
- name: Remove known problem packages
|
||||
package:
|
||||
|
@ -13,18 +13,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
neutron_packages_list:
|
||||
- packages: "{{ neutron_distro_packages }}"
|
||||
enabled: yes
|
||||
- packages: "{{ neutron_ovs_distro_packages }}"
|
||||
enabled: "{{ (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) }}"
|
||||
- packages: "{{ neutron_lxb_distro_packages }}"
|
||||
enabled: "{{ neutron_services['neutron-linuxbridge-agent']['group'] in group_names and neutron_services['neutron-linuxbridge-agent'].service_en | bool }}"
|
||||
- packages: "{{ neutron_lbaas_distro_packages }}"
|
||||
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() %}
|
||||
@ -33,3 +21,21 @@ filtered_neutron_services: >
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{{- services -}}
|
||||
|
||||
neutron_packages_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)
|
||||
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) -%}
|
||||
{% set _ = packages.extend(neutron_ovs_distro_packages) -%}
|
||||
{% endif -%}
|
||||
{% 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) -%}
|
||||
{% endif -%}
|
||||
{% if neutron_services['neutron-lbaasv2-agent']['group'] in group_names and neutron_lbaasv2 | bool -%}
|
||||
{% set _ = packages.extend(neutron_lbaas_distro_packages) -%}
|
||||
{% endif -%}
|
||||
{% if neutron_services['neutron-vpnaas-agent']['group'] in group_names and neutron_vpnaas | bool -%}
|
||||
{% set _ = packages.extend(neutron_vpnaas_distro_packages) -%}
|
||||
{% endif -%}
|
||||
{{ packages -}}
|
Loading…
x
Reference in New Issue
Block a user