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