container, service: Support reloading containers on template file change
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
container_secrets: "{{ _service_additional_container_secrets }}"
|
||||
container_env: "{{ _service_additional_container.env }}"
|
||||
container_add_capabilities: "{{ _service_additional_container.add_capabilities }}"
|
||||
container_reload_method: "{{ _service_additional_container.reload_method }}"
|
||||
container_reload_command: "{{ _service_additional_container.reload_command }}"
|
||||
container_requires: "{{ _service_additional_container_requires }}"
|
||||
container_wants: "{{ _service_additional_container_wants }}"
|
||||
container_auto_update: "{{ service_auto_update }}"
|
||||
|
||||
@@ -24,7 +24,9 @@
|
||||
dest: "{{ item[1] }}"
|
||||
mode: "{{ item[0].mode | default('0644') }}"
|
||||
validate: "{{ validate if item[0].template_validate_command is defined else omit }}"
|
||||
notify: Restart container service {{ service_name }}
|
||||
notify: >-
|
||||
{{ 'Reload' if service_container_reload_method != 'none' else 'Restart' }}
|
||||
container service {{ service_name }}
|
||||
loop: "{{ _service_all_template_mounts | zip(_service_all_template_mount_host_files) }}"
|
||||
vars:
|
||||
validate: >-
|
||||
|
||||
@@ -48,6 +48,8 @@
|
||||
container_secrets: "{{ _service_container_secrets }}"
|
||||
container_env: "{{ service_container_env }}"
|
||||
container_add_capabilities: "{{ service_container_add_capabilities }}"
|
||||
container_reload_method: "{{ service_container_reload_method }}"
|
||||
container_reload_command: "{{ service_container_reload_command }}"
|
||||
container_requires: "{{ _service_container_requires }}"
|
||||
container_wants: "{{ _service_container_wants }}"
|
||||
container_auto_update: "{{ service_auto_update }}"
|
||||
|
||||
Reference in New Issue
Block a user