Merge "Assert container's ssl cert exists before upgrade."
This commit is contained in:
commit
1c1b6649e3
@ -180,11 +180,19 @@ outputs:
|
||||
- name: set kolla_dir fact
|
||||
set_fact: kolla_dir="/var/lib/kolla/config_files/src-tls"
|
||||
|
||||
- name: assert {{ kolla_dir }}{{ cert_path }} exists
|
||||
stat:
|
||||
path: "{{ kolla_dir }}{{cert_path}}"
|
||||
register: kolla_cert_exists
|
||||
|
||||
- name: set certificate group on host via container
|
||||
command: docker exec {{container_id.stdout}} chgrp haproxy {{kolla_dir}}{{cert_path}}
|
||||
when: kolla_cert_exists.stat.exists
|
||||
|
||||
- name: copy certificate from kolla directory to final location
|
||||
command: docker exec {{container_id.stdout}} cp {{kolla_dir}}{{cert_path}} {{cert_path}}
|
||||
when: kolla_cert_exists.stat.exists
|
||||
|
||||
- name: send restart order to haproxy container
|
||||
command: docker kill --signal=HUP {{container_id.stdout}}
|
||||
when: kolla_cert_exists.stat.exists
|
||||
|
Loading…
x
Reference in New Issue
Block a user