Correct master manifest cleanup logic (#1693)

Fixes #1666
This commit is contained in:
Matthew Mosesohn 2017-09-25 12:19:04 +01:00 committed by GitHub
parent cfce23950a
commit a1cde03b20

View file

@ -17,14 +17,14 @@
file:
path: "/etc/kubernetes/manifests/{{item}}.manifest"
state: absent
with_nested:
with_items:
- ["kube-apiserver", "kube-controller-manager", "kube-scheduler"]
register: kube_apiserver_manifest_replaced
when: (secret_changed|default(false) or etcd_secret_changed|default(false))
- name: "Pre-upgrade | Delete master containers forcefully"
shell: "docker ps -f name=k8s-{{item}}* -q | xargs --no-run-if-empty docker rm -f"
with_nested:
with_items:
- ["kube-apiserver", "kube-controller-manager", "kube-scheduler"]
when: kube_apiserver_manifest_replaced.changed
run_once: true