@ -47,6 +47,8 @@
with_items: docker_package_info.pkgs
when: docker_package_info.pkgs|length > 0
- meta: flush_handlers
- name: ensure docker service is started and enabled
service:
name: "{{ item }}"
@ -1,14 +1,15 @@
---
- name: restart systemd-etcd
- name: restart etcd
command: /bin/true
notify:
- reload systemd
- restart etcd
- reload etcd
- name: reload systemd
command: systemctl daemon-reload
when: init_system == "systemd"
- name: reload etcd
name: etcd
state: restarted
@ -7,7 +7,7 @@
notify: restart systemd-etcd
- name: Configure | Write calico-node initd script
- name: Configure | Write etcd initd script
template:
src: deb-etcd.initd.j2
dest: /etc/init.d/etcd
@ -21,9 +21,3 @@
src: etcd.j2
dest: /etc/etcd.env
notify: restart etcd
- name: Configure | Ensure etcd is running
state: started
enabled: yes
@ -6,3 +6,13 @@
when: etcd_copy.stdout_lines
# reload systemd before starting service
- name: Ensure etcd is running
@ -1,6 +1,6 @@
[Unit]
Description=etcd
Conflicts=etcd.service
[Service]
User=etcd
@ -1,25 +1,16 @@
- name: restart systemd-kubelet
- restart kubelet
- name: restart systemd-kube-apiserver
- name: restart kube-apiserver
- restart kube-apiserver
- reload kube-apiserver
- name: restart kubelet
name: kubelet
- name: reload kube-apiserver
name: kube-apiserver
@ -47,7 +47,7 @@
dest: "/etc/systemd/system/kube-apiserver.service"
backup: yes
notify: restart systemd-kube-apiserver
notify: restart kube-apiserver
- name: install | Write kube-apiserver initd script
@ -80,6 +80,9 @@
changed_when: is_gentoken_calico|default(false)
# reload-systemd
- name: Enable apiserver
@ -1,18 +1,19 @@
- reload kubelet
- name: set is_gentoken_calico fact
set_fact:
is_gentoken_calico: true
- name: reload kubelet
@ -41,7 +41,7 @@
- name: Write proxy manifest
src: manifests/kube-proxy.manifest.j2
dest: "{{ kube_manifest_dir }}/kube-proxy.manifest"
@ -50,6 +50,9 @@
notify: restart kubelet
when: kubelet_copy.stdout_lines
- name: Enable kubelet
@ -13,7 +13,8 @@
dest: /usr/bin/calicoctl
state: link
- wait_for:
- name: Calico | wait for etcd
wait_for:
port: 2379
when: inventory_hostname in groups['kube-master']
@ -68,6 +69,8 @@
when: init_system == "sysvinit" and ansible_os_family == "RedHat"
notify: restart calico-node
- name: Calico | Enable calico-node
service: name=calico-node enabled=yes state=started
@ -2,7 +2,7 @@
Description=Calico per-node agent
Documentation=https://github.com/projectcalico/calico-docker
Requires=docker.service
After=docker.service etcd2.service
After=docker.service etcd.service
User=root