Dmitriy Rabotyagov eea1a4853f Fix linters and metadata
With update of ansible-lint to version >=6.0.0 a lot of new
linters were added, that enabled by default. In order to comply
with linter rules we're applying changes to the role.

With that we also update metdata to reflect current state.

Depends-On: https://review.opendev.org/c/openstack/ansible-role-systemd_service/+/888223
Change-Id: Id92330b3c709201a74612c8353cefa75778eac0c
2023-07-14 20:44:53 +02:00

67 lines
2.4 KiB
YAML

---
# Copyright 2018, 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.
keystone_core_files: []
uwsgi_keystone_services: |-
{% set services = {} %}
{% for key, value in keystone_services.items() %}
{% if (value['group'] in group_names) and
(('condition' not in value) or ('condition' in value and value['condition']))
and ('wsgi_app' in value and value['wsgi_app']) %}
{% set _ = value.update(
{
'wsgi_venv': (keystone_install_method == 'source') | ternary(keystone_bin | dirname, None),
'uwsgi_uid': keystone_system_user_name,
'uwsgi_guid': keystone_system_group_name,
'uwsgi_processes': keystone_wsgi_processes,
'uwsgi_threads': keystone_wsgi_threads,
}
) %}
{% set _ = services.update({key: value}) %}
{% endif %}
{% endfor %}
{{ services }}
_keystone_is_first_play_host: >-
{{
(keystone_services['keystone-wsgi-public']['group'] in group_names and
inventory_hostname == ((groups[keystone_services['keystone-wsgi-public']['group']] | intersect(ansible_play_hosts)) | list)[0]) | bool
}}
_keystone_is_last_play_host: >-
{{
(keystone_services['keystone-wsgi-public']['group'] in group_names and
inventory_hostname == ((groups[keystone_services['keystone-wsgi-public']['group']] | intersect(ansible_play_hosts)) | list)[-1]) | bool
}}
_keystone_cache_backend_map:
dogpile:
- oslo_cache.memcache_pool
- dogpile.cache.pymemcache
- dogpile.cache.memcached
- dogpile.cache.bmemcached
mongo:
- oslo_cache.mongo
etcd3gw:
- oslo_cache.etcd3gw
_keystone_cache_backend_package: |-
{% set oslo = namespace(backend='dogpile') %}
{% for key, value in _keystone_cache_backend_map.items() %}
{% if keystone_cache_backend in value %}
{% set oslo.backend = key %}
{%- endif %}
{%- endfor %}
oslo.cache[{{ oslo.backend }}]