Merge pull request #105 from ansibl8s/fix_handlers

fix some handlers
This commit is contained in:
Antoine Legrand 2016-01-25 23:00:07 +01:00
commit 08052f60da
6 changed files with 26 additions and 32 deletions

View file

@ -72,9 +72,8 @@
- name: Restart apiserver
command: "/bin/true"
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
- name: Enable apiserver
@ -127,9 +126,3 @@
name: kubelet
state: restarted
changed_when: false
- name: Enable apiserver
service:
name: kube-apiserver
enabled: yes
state: started

View file

@ -1,25 +1,25 @@
[Unit]
Description=Kubernetes API Server
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
Requires=kube-apiserver.service
After=kube-apiserver.service
Requires=etcd.service
After=etcd.service
[Service]
EnvironmentFile=/etc/kubernetes/kube-apiserver.env
User=kube
ExecStart={{ bin_dir }}/kube-apiserver \
$KUBE_LOGTOSTDERR \
$KUBE_LOG_LEVEL \
$KUBE_ETCD_SERVERS \
$KUBE_API_ADDRESS \
$KUBE_API_PORT \
$KUBELET_PORT \
$KUBE_ALLOW_PRIV \
$KUBE_SERVICE_ADDRESSES \
$KUBE_ADMISSION_CONTROL \
$KUBE_RUNTIME_CONFIG \
$KUBE_LOGTOSTDERR \
$KUBE_LOG_LEVEL \
$KUBE_ETCD_SERVERS \
$KUBE_API_ADDRESS \
$KUBE_API_PORT \
$KUBELET_PORT \
$KUBE_ALLOW_PRIV \
$KUBE_SERVICE_ADDRESSES \
$KUBE_ADMISSION_CONTROL \
$KUBE_RUNTIME_CONFIG \
$KUBE_TLS_CONFIG \
$KUBE_API_ARGS
$KUBE_API_ARGS
Restart=on-failure
Type=notify
LimitNOFILE=65536

View file

@ -7,7 +7,7 @@
command: /bin/true
notify:
- reload systemd
- restart kubelet
- reload kubelet
- name: set is_gentoken_calico fact
set_fact:

View file

@ -1,16 +1,16 @@
---
- name: restart systemd-calico-node
- name: restart calico-node
command: /bin/true
notify:
- reload systemd
- restart calico-node
- reload calico-node
- name: restart systemd-docker
- name: restart docker
command: /bin/true
notify:
- reload systemd
- restart docker
- restart kubelet
- reload docker
- reload kubelet
- name: delete default docker bridge
command: ip link delete docker0
@ -19,18 +19,19 @@
- name : reload systemd
shell: systemctl daemon-reload
when: init_system == "systemd"
- name: restart calico-node
- name: reload calico-node
service:
name: calico-node
state: restarted
- name: restart docker
- name: reload docker
service:
name: docker
state: restarted
- name: restart kubelet
- name: reload kubelet
service:
name: kubelet
state: restarted

View file

@ -57,7 +57,7 @@
- name: Calico | Write calico-node systemd init file
template: src=calico/calico-node.service.j2 dest=/etc/systemd/system/calico-node.service
when: init_system == "systemd"
notify: restart systemd-calico-node
notify: restart calico-node
- name: Calico | Write calico-node initd script
template: src=calico/deb-calico.initd.j2 dest=/etc/init.d/calico-node owner=root mode=755

View file

@ -21,7 +21,7 @@
template:
src: systemd-docker.service
dest: /lib/systemd/system/docker.service
notify: restart systemd-docker
notify: restart docker
when: init_system == "systemd"
- meta: flush_handlers