Merge "Set ODL API restart policy to unless-stopped"
This commit is contained in:
commit
3d970bb2ed
@ -127,7 +127,7 @@ outputs:
|
||||
net: host
|
||||
detach: true
|
||||
user: odl
|
||||
restart: always
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: /openstack/healthcheck
|
||||
volumes:
|
||||
@ -188,6 +188,15 @@ outputs:
|
||||
# Containerized deployment upgrade steps
|
||||
- name: ODL container L2 update and upgrade tasks
|
||||
block: &odl_container_upgrade_tasks
|
||||
- name: Check if ODL container is present
|
||||
shell: "docker ps -a --format '{{ '{{' }}.Names{{ '}}' }}' | grep '^opendaylight_api$'"
|
||||
register: opendaylight_api_container_present
|
||||
failed_when: false
|
||||
# NOTE: using shell module because of
|
||||
# https://github.com/ansible/ansible/issues/27960
|
||||
- name: Update ODL container restart policy to unless-stopped
|
||||
shell: "docker update --restart=unless-stopped opendaylight_api"
|
||||
when: opendaylight_api_container_present.rc == 0
|
||||
- name: stop previous ODL container
|
||||
docker_container:
|
||||
name: opendaylight_api
|
||||
@ -245,6 +254,15 @@ outputs:
|
||||
odl_update_level: {get_param: ODLUpdateLevel}
|
||||
- name: Stop ODL container and remove cache
|
||||
block:
|
||||
- name: Check if ODL container is present
|
||||
shell: "docker ps -a --format '{{ '{{' }}.Names{{ '}}' }}' | grep '^opendaylight_api$'"
|
||||
register: opendaylight_api_container_present
|
||||
failed_when: false
|
||||
# NOTE: using shell module because of
|
||||
# https://github.com/ansible/ansible/issues/27960
|
||||
- name: Update ODL container restart policy to unless-stopped
|
||||
shell: "docker update --restart=unless-stopped opendaylight_api"
|
||||
when: opendaylight_api_container_present.rc == 0
|
||||
- name: Stop previous ODL container
|
||||
docker_container:
|
||||
name: opendaylight_api
|
||||
|
Loading…
x
Reference in New Issue
Block a user