Merge "HA: inject public certificates without blocking container" into stable/victoria
This commit is contained in:
commit
edf9bfedc7
|
@ -178,7 +178,11 @@ outputs:
|
||||||
- name: copy certificate, chgrp, restart haproxy
|
- name: copy certificate, chgrp, restart haproxy
|
||||||
shell: |
|
shell: |
|
||||||
set -e
|
set -e
|
||||||
{{ container_cli }} cp {{ cert_path }} {{ item }}:{{ cert_path }}
|
if {{ container_cli }} ps -f "id={{ item }}" --format "{{ '{{' }}.Names{{ '}}' }}" | grep -q "^haproxy-bundle"; then
|
||||||
|
tar -c {{ cert_path }} | {{container_cli}} exec -i {{ item }} tar -C / -xv
|
||||||
|
else
|
||||||
|
{{ container_cli }} cp {{ cert_path }} {{ item }}:{{ cert_path }}
|
||||||
|
fi
|
||||||
{{ container_cli }} exec --user root {{ item }} chgrp haproxy {{ cert_path }}
|
{{ container_cli }} exec --user root {{ item }} chgrp haproxy {{ cert_path }}
|
||||||
{{ container_cli }} kill --signal=HUP {{ item }}
|
{{ container_cli }} kill --signal=HUP {{ item }}
|
||||||
with_items: "{{ container_id.stdout.split('\n') }}"
|
with_items: "{{ container_id.stdout.split('\n') }}"
|
||||||
|
|
Loading…
Reference in New Issue