openstack-ansible/tests/roles/bootstrap-host/vars/main.yml

60 lines
2.2 KiB
YAML

---
# Copyright 2017, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
bootstrap_host_scenarios: "{{ (bootstrap_host_scenario.split('_') | reject('equalto', '')) | list }}"
_non_service_scenarios:
- aio
- distro
- lxc
- metal
- nspawn
- octaviav2
- proxy
- source
- telemetry
- translations
- varstest
bootstrap_host_services: |-
{% set service_list = ['keystone'] %}
{% set service_list_extra = bootstrap_host_scenarios | difference(_non_service_scenarios) %}
{% if 'metal' not in bootstrap_host_scenarios %}
{% set _ = service_list.append('haproxy') %}
{% endif %}
{% if ['aio', 'translations'] | intersect(bootstrap_host_scenarios) | length > 0 %}
{# Base services deployed with aio and translations scenarios #}
{% set _ = service_list.extend(['cinder', 'glance', 'neutron', 'nova', 'placement']) %}
{% if 'metal' not in bootstrap_host_scenarios %}
{# Horizon is a base service in container jobs #}
{% set _ = service_list.append('horizon') %}
{% endif %}
{% endif %}
{# Service additions based on scenario presence #}
{% if 'ironic' in bootstrap_host_scenarios %}
{% set _ = service_list.extend(['swift']) %}
{% endif %}
{% if 'octaviav2' in bootstrap_host_scenarios %}
{% set _ = service_list.extend(['octavia']) %}
{% endif %}
{% if 'telemetry' in bootstrap_host_scenarios %}
{% set _ = service_list.extend(['aodh', 'ceilometer', 'gnocchi', 'panko']) %}
{% endif %}
{% if 'translations' in bootstrap_host_scenarios %}
{% set _ = service_list.extend(['designate', 'heat', 'magnum', 'sahara', 'swift', 'trove']) %}
{% endif %}
{% set _ = service_list.extend(service_list_extra) %}
{{ (service_list | unique) | sort }}