56fc74f231
Role vars have a higher precedence than role defaults. This allows to import default vars from another role via vars_files without overriding project_name (see related bug for details). Change-Id: I3d919736e53d6f3e1a70d1267cf42c8d2c0ad221 Related-Bug: #1951785
74 lines
3.6 KiB
YAML
74 lines
3.6 KiB
YAML
---
|
|
redis_services:
|
|
redis:
|
|
container_name: redis
|
|
group: redis
|
|
enabled: true
|
|
image: "{{ redis_image_full }}"
|
|
volumes: "{{ redis_default_volumes + redis_extra_volumes }}"
|
|
dimensions: "{{ redis_dimensions }}"
|
|
healthcheck: "{{ redis_healthcheck }}"
|
|
redis-sentinel:
|
|
container_name: redis_sentinel
|
|
group: redis
|
|
enabled: true
|
|
image: "{{ redis_sentinel_image_full }}"
|
|
volumes: "{{ redis_sentinel_default_volumes + redis_sentinel_extra_volumes }}"
|
|
dimensions: "{{ redis_sentinel_dimensions }}"
|
|
healthcheck: "{{ redis_sentinel_healthcheck }}"
|
|
|
|
####################
|
|
# Docker
|
|
####################
|
|
redis_install_type: "{{ kolla_install_type }}"
|
|
redis_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ redis_install_type }}-redis"
|
|
redis_tag: "{{ openstack_tag }}"
|
|
redis_image_full: "{{ redis_image }}:{{ redis_tag }}"
|
|
|
|
redis_sentinel_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ redis_install_type }}-redis-sentinel"
|
|
redis_sentinel_tag: "{{ openstack_tag }}"
|
|
redis_sentinel_image_full: "{{ redis_sentinel_image }}:{{ redis_tag }}"
|
|
redis_dimensions: "{{ default_container_dimensions }}"
|
|
redis_sentinel_dimensions: "{{ default_container_dimensions }}"
|
|
|
|
redis_enable_healthchecks: "{{ enable_container_healthchecks }}"
|
|
redis_healthcheck_interval: "{{ default_container_healthcheck_interval }}"
|
|
redis_healthcheck_retries: "{{ default_container_healthcheck_retries }}"
|
|
redis_healthcheck_start_period: "{{ default_container_healthcheck_start_period }}"
|
|
redis_healthcheck_test: ["CMD-SHELL", "healthcheck_listen redis-server {{ redis_port }}"]
|
|
redis_healthcheck_timeout: "{{ default_container_healthcheck_timeout }}"
|
|
redis_healthcheck:
|
|
interval: "{{ redis_healthcheck_interval }}"
|
|
retries: "{{ redis_healthcheck_retries }}"
|
|
start_period: "{{ redis_healthcheck_start_period }}"
|
|
test: "{% if redis_enable_healthchecks | bool %}{{ redis_healthcheck_test }}{% else %}NONE{% endif %}"
|
|
timeout: "{{ redis_healthcheck_timeout }}"
|
|
|
|
redis_sentinel_enable_healthchecks: "{{ enable_container_healthchecks }}"
|
|
redis_sentinel_healthcheck_interval: "{{ default_container_healthcheck_interval }}"
|
|
redis_sentinel_healthcheck_retries: "{{ default_container_healthcheck_retries }}"
|
|
redis_sentinel_healthcheck_start_period: "{{ default_container_healthcheck_start_period }}"
|
|
redis_sentinel_healthcheck_test: ["CMD-SHELL", "healthcheck_listen redis-sentinel {{ redis_sentinel_port }}"]
|
|
redis_sentinel_healthcheck_timeout: "{{ default_container_healthcheck_timeout }}"
|
|
redis_sentinel_healthcheck:
|
|
interval: "{{ redis_sentinel_healthcheck_interval }}"
|
|
retries: "{{ redis_sentinel_healthcheck_retries }}"
|
|
start_period: "{{ redis_sentinel_healthcheck_start_period }}"
|
|
test: "{% if redis_sentinel_enable_healthchecks | bool %}{{ redis_sentinel_healthcheck_test }}{% else %}NONE{% endif %}"
|
|
timeout: "{{ redis_sentinel_healthcheck_timeout }}"
|
|
|
|
redis_default_volumes:
|
|
- "{{ node_config_directory }}/redis/:{{ container_config_directory }}/:ro"
|
|
- "/etc/localtime:/etc/localtime:ro"
|
|
- "{{ '/etc/timezone:/etc/timezone:ro' if ansible_facts.os_family == 'Debian' else '' }}"
|
|
- "{{ project_name }}:/var/lib/redis/"
|
|
- "kolla_logs:/var/log/kolla/"
|
|
redis_sentinel_default_volumes:
|
|
- "{{ node_config_directory }}/redis-sentinel/:{{ container_config_directory }}/:ro"
|
|
- "/etc/localtime:/etc/localtime:ro"
|
|
- "{{ '/etc/timezone:/etc/timezone:ro' if ansible_facts.os_family == 'Debian' else '' }}"
|
|
- "kolla_logs:/var/log/kolla/"
|
|
|
|
redis_extra_volumes: "{{ default_extra_volumes }}"
|
|
redis_sentinel_extra_volumes: "{{ default_extra_volumes }}"
|