Use global service variables

Instead of overriding each service separatelly it might make
sense for deployers to define some higher level variable that
will be used first or fallback to default variable.

Change-Id: Ic2fa270a3582db3da01b3c449fbdd8c2d5045062
This commit is contained in:
Dmitriy Rabotyagov 2021-01-08 19:02:06 +02:00
parent f37cb88680
commit 0629e28768
2 changed files with 7 additions and 5 deletions

View File

@ -26,8 +26,7 @@ trove_venv_python_executable: "{{ openstack_venv_python_executable | default('py
trove_service_setup_host: "{{ openstack_service_setup_host | default('localhost') }}"
trove_service_setup_host_python_interpreter: "{{ openstack_service_setup_host_python_interpreter | default((trove_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_python['executable'])) }}"
trove_package_state: "latest"
trove_pip_package_state: "latest"
trove_package_state: "{{ package_state | default('latest') }}"
debug: false
trove_system_group_name: trove
@ -48,7 +47,7 @@ trove_service_description: "OpenStack DBaaS (Trove)"
trove_service_project_name: "{{ trove_service_tenant_name }}"
trove_service_admin_role_names:
- admin
trove_service_region: RegionOne
trove_service_region: "{{ service_region | default('RegionOne') }}"
trove_service_host: "{{ openstack_service_bind_address | default('0.0.0.0') }}"
trove_service_port: 8779
trove_service_proto: http
@ -60,6 +59,8 @@ trove_service_internalurl: "{{ trove_service_internaluri_proto }}://{{ internal_
trove_service_adminurl: "{{ trove_service_adminuri_proto }}://{{ internal_lb_vip_address }}:{{ trove_service_port }}/v1.0/%(tenant_id)s"
trove_auth_url: "{{ keystone_service_internalurl }}"
trove_service_in_ldap: "{{ service_ldap_backend_enabled | default(False) }}"
trove_profiler_enabled: false
## Cap the maximum number of threads / workers when a user value is unspecified.
@ -71,7 +72,7 @@ trove_conductor_workers_max: 16
trove_conductor_workers: "{{ [[(ansible_processor_vcpus//ansible_processor_threads_per_core)|default(1), 1] | max * 2, trove_conductor_workers_max] | min }}"
# Enable/Disable Ceilometer
trove_ceilometer_enabled: False
trove_ceilometer_enabled: "{{ (groups['ceilometer_all'] is defined) and (groups['ceilometer_all'] | length > 0) }}"
trove_pip_install_args: "{{ pip_install_options | default('') }}"
@ -95,7 +96,7 @@ trove_galera_user: trove
trove_db_sync_options:
trove_galera_use_ssl: "{{ galera_use_ssl | default(False) }}"
trove_galera_ssl_ca_cert: "{{ galera_ssl_ca_cert | default('/etc/ssl/certs/galera-ca.pem') }}"
trove_galera_port: 3306
trove_galera_port: "{{ galera_port | default('3306') }}"
trove_galera_connection_string: "mysql+pymysql://{{ trove_galera_user}}:{{ trove_galera_password }}@{{ trove_galera_address }}:{{ trove_galera_port }}/{{ trove_galera_database_name }}?charset=utf8{% if trove_galera_use_ssl | bool %}&ssl_ca={{ trove_galera_ssl_ca_cert }}{% endif %}"
## Oslo Messaging vars

View File

@ -145,6 +145,7 @@
_service_adminuri_insecure: "{{ keystone_service_adminuri_insecure }}"
_service_setup_host: "{{ trove_service_setup_host }}"
_service_setup_host_python_interpreter: "{{ trove_service_setup_host_python_interpreter }}"
_service_in_ldap: "{{ trove_service_in_ldap }}"
_service_project_name: "{{ trove_service_project_name }}"
_service_region: "{{ trove_service_region }}"
_service_users: |-