commit
08052f60da
6 changed files with 26 additions and 32 deletions
|
@ -72,9 +72,8 @@
|
||||||
- name: Restart apiserver
|
- name: Restart apiserver
|
||||||
command: "/bin/true"
|
command: "/bin/true"
|
||||||
notify: restart kube-apiserver
|
notify: restart kube-apiserver
|
||||||
when: is_gentoken_calico|default(false) or kube_apiserver_copy.stdout_lines
|
when: is_gentoken_calico|default(false)
|
||||||
|
|
||||||
# reload-systemd
|
|
||||||
- meta: flush_handlers
|
- meta: flush_handlers
|
||||||
|
|
||||||
- name: Enable apiserver
|
- name: Enable apiserver
|
||||||
|
@ -127,9 +126,3 @@
|
||||||
name: kubelet
|
name: kubelet
|
||||||
state: restarted
|
state: restarted
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: Enable apiserver
|
|
||||||
service:
|
|
||||||
name: kube-apiserver
|
|
||||||
enabled: yes
|
|
||||||
state: started
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Kubernetes API Server
|
Description=Kubernetes API Server
|
||||||
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
|
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
|
||||||
Requires=kube-apiserver.service
|
Requires=etcd.service
|
||||||
After=kube-apiserver.service
|
After=etcd.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
EnvironmentFile=/etc/kubernetes/kube-apiserver.env
|
EnvironmentFile=/etc/kubernetes/kube-apiserver.env
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
command: /bin/true
|
command: /bin/true
|
||||||
notify:
|
notify:
|
||||||
- reload systemd
|
- reload systemd
|
||||||
- restart kubelet
|
- reload kubelet
|
||||||
|
|
||||||
- name: set is_gentoken_calico fact
|
- name: set is_gentoken_calico fact
|
||||||
set_fact:
|
set_fact:
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
---
|
---
|
||||||
- name: restart systemd-calico-node
|
- name: restart calico-node
|
||||||
command: /bin/true
|
command: /bin/true
|
||||||
notify:
|
notify:
|
||||||
- reload systemd
|
- reload systemd
|
||||||
- restart calico-node
|
- reload calico-node
|
||||||
|
|
||||||
- name: restart systemd-docker
|
- name: restart docker
|
||||||
command: /bin/true
|
command: /bin/true
|
||||||
notify:
|
notify:
|
||||||
- reload systemd
|
- reload systemd
|
||||||
- restart docker
|
- reload docker
|
||||||
- restart kubelet
|
- reload kubelet
|
||||||
|
|
||||||
- name: delete default docker bridge
|
- name: delete default docker bridge
|
||||||
command: ip link delete docker0
|
command: ip link delete docker0
|
||||||
|
@ -19,18 +19,19 @@
|
||||||
|
|
||||||
- name : reload systemd
|
- name : reload systemd
|
||||||
shell: systemctl daemon-reload
|
shell: systemctl daemon-reload
|
||||||
|
when: init_system == "systemd"
|
||||||
|
|
||||||
- name: restart calico-node
|
- name: reload calico-node
|
||||||
service:
|
service:
|
||||||
name: calico-node
|
name: calico-node
|
||||||
state: restarted
|
state: restarted
|
||||||
|
|
||||||
- name: restart docker
|
- name: reload docker
|
||||||
service:
|
service:
|
||||||
name: docker
|
name: docker
|
||||||
state: restarted
|
state: restarted
|
||||||
|
|
||||||
- name: restart kubelet
|
- name: reload kubelet
|
||||||
service:
|
service:
|
||||||
name: kubelet
|
name: kubelet
|
||||||
state: restarted
|
state: restarted
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
- name: Calico | Write calico-node systemd init file
|
- name: Calico | Write calico-node systemd init file
|
||||||
template: src=calico/calico-node.service.j2 dest=/etc/systemd/system/calico-node.service
|
template: src=calico/calico-node.service.j2 dest=/etc/systemd/system/calico-node.service
|
||||||
when: init_system == "systemd"
|
when: init_system == "systemd"
|
||||||
notify: restart systemd-calico-node
|
notify: restart calico-node
|
||||||
|
|
||||||
- name: Calico | Write calico-node initd script
|
- name: Calico | Write calico-node initd script
|
||||||
template: src=calico/deb-calico.initd.j2 dest=/etc/init.d/calico-node owner=root mode=755
|
template: src=calico/deb-calico.initd.j2 dest=/etc/init.d/calico-node owner=root mode=755
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
template:
|
template:
|
||||||
src: systemd-docker.service
|
src: systemd-docker.service
|
||||||
dest: /lib/systemd/system/docker.service
|
dest: /lib/systemd/system/docker.service
|
||||||
notify: restart systemd-docker
|
notify: restart docker
|
||||||
when: init_system == "systemd"
|
when: init_system == "systemd"
|
||||||
|
|
||||||
- meta: flush_handlers
|
- meta: flush_handlers
|
||||||
|
|
Loading…
Reference in a new issue