service: Make supporting containers accessible using simple hostnames
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
container_networks: "{{ _service_container_networks }}"
|
||||
container_ip: "{{ _service_additional_container_ip }}"
|
||||
container_secrets: "{{ _service_additional_container.secrets | default(_service_container_secrets) }}"
|
||||
container_hostname: "{{ _service_additional_container.name | regex_replace('^' ~ service_name ~ '-', '') }}"
|
||||
container_env: "{{ _service_additional_container.env | default(service_container_env) }}"
|
||||
container_requires: "{{ _service_container_requires }}"
|
||||
container_wants: "{{ service_wants }}"
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
source: "{{ _service_database_name }}"
|
||||
destination: "{{ _service_database_mount_destination }}"
|
||||
container_networks: "{{ _service_database_networks }}"
|
||||
container_hostname: "{{ service_database_type }}"
|
||||
container_ip: >-
|
||||
{{ service_container_ip | ansible.utils.ipmath(1) if _service_static_ip else '' }}
|
||||
container_secrets:
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
container_image: docker.io/valkey/valkey:alpine
|
||||
container_networks:
|
||||
- "{{ service_name }}"
|
||||
container_hostname: redis
|
||||
container_ip: >-
|
||||
{{ service_container_ip | ansible.utils.ipmath(2) if _service_static_ip else '' }}
|
||||
container_auto_update: "{{ service_auto_update }}"
|
||||
|
||||
Reference in New Issue
Block a user