image-serve: only uninstall docker-distribution when it was installed
Change-Id: Ib34d2ac3d6cb53cc40ec116953338568d1fbc6cd
This commit is contained in:
parent
17d1ed8d56
commit
5d8e8bd860
@ -63,13 +63,21 @@ outputs:
|
||||
- include_role:
|
||||
name: tripleo-image-serve
|
||||
upgrade_tasks:
|
||||
- name: Stop, disable docker-distribution
|
||||
- name: Uninstall docker-distribution
|
||||
when: step|int == 3
|
||||
block:
|
||||
- name: check if docker-distribution is installed
|
||||
command: /usr/bin/rpm -q docker-distribution
|
||||
failed_when: false
|
||||
register: docker_distribution_installed
|
||||
check_mode: no
|
||||
- name: Stop, disable docker-distribution
|
||||
systemd:
|
||||
enabled: false
|
||||
state: stopped
|
||||
name: docker-distribution
|
||||
when: docker_distribution_installed.rc == 0
|
||||
- name: Uninstall docker-distribution
|
||||
when: step|int == 3
|
||||
package: name=docker-distribution state=absent
|
||||
when: docker_distribution_installed.rc == 0
|
||||
# TODO(sbaker) migrate docker-distribution data to image-serve
|
||||
|
Loading…
Reference in New Issue
Block a user