Run dns_late preinstall tasks on all k8s nodes (#4672)

* Run dns_late preinstall tasks on all k8s nodes

Related issue: #4656

Change-Id: I63f8559ef1a497b7580ab084561e6603fe647834

* Fix ansible-lint

Change-Id: Ia5b33fa63dbc36d8c3e9557ef3f2ea02af2325a5

* Fix recover_control_plane lint issues

Change-Id: I16643a3193c11b6ba704e9698812cac7e4fd19a8
This commit is contained in:
Matthew Mosesohn
2019-04-29 15:12:22 +03:00
committed by Kubernetes Prow Robot
parent fbba259933
commit a5b46bfc8c
5 changed files with 18 additions and 3 deletions

View File

@@ -1,5 +1,6 @@
---
- name: Delete old certificates
# noqa 302 - rm is ok here for now
shell: "rm /etc/ssl/etcd/ssl/*{{ item }}* /etc/kubernetes/ssl/etcd/*{{ item }}*"
with_items: "{{ old_etcds.split(',') }}"
register: delete_old_cerificates

View File

@@ -20,7 +20,9 @@
state: stopped
- name: Remove etcd data-dir
shell: "rm -rf {{ etcd_data_dir }}"
file:
path: "{{ etcd_data_dir }}"
state: absent
- name: Restore etcd snapshot
shell: "{{ bin_dir }}/etcdctl snapshot restore /tmp/snapshot.db --name {{ etcd_member_name }} --initial-cluster {{ etcd_member_name }}={{ etcd_peer_url }} --initial-cluster-token k8s_etcd --initial-advertise-peer-urls {{ etcd_peer_url }} --data-dir {{ etcd_data_dir }}"