diff --git a/roles/apps/k8s-common b/roles/apps/k8s-common index 1b0318421..2ef9669d6 160000 --- a/roles/apps/k8s-common +++ b/roles/apps/k8s-common @@ -1 +1 @@ -Subproject commit 1b0318421f4f812a4ebec2d4ddbcb2834658acf0 +Subproject commit 2ef9669d6d78e81c4e6de75cce239cabc99f00ad diff --git a/roles/apps/k8s-elasticsearch b/roles/apps/k8s-elasticsearch index 2de264f00..3d74c70a4 160000 --- a/roles/apps/k8s-elasticsearch +++ b/roles/apps/k8s-elasticsearch @@ -1 +1 @@ -Subproject commit 2de264f00738b7518647d8ba5844868d0be5feae +Subproject commit 3d74c70a4a2d294ec86528468efa2c10ece7bd7b diff --git a/roles/apps/k8s-memcached b/roles/apps/k8s-memcached index e550ec4c1..563b35f3b 160000 --- a/roles/apps/k8s-memcached +++ b/roles/apps/k8s-memcached @@ -1 +1 @@ -Subproject commit e550ec4c181abce0e5e58ccab81fb7f2c2756b00 +Subproject commit 563b35f3b62274e20add75684ac51ff741050975 diff --git a/roles/docker/tasks/configure.yml b/roles/docker/tasks/configure.yml index 75df4d4de..d370f4b84 100644 --- a/roles/docker/tasks/configure.yml +++ b/roles/docker/tasks/configure.yml @@ -1,6 +1,6 @@ --- - name: Write script for calico/docker bridge configuration - template: src=create_cbr.j2 dest=/etc/network/if-up.d/create_cbr mode=u+x + template: src=create_cbr.j2 dest=/etc/network/if-up.d/create_cbr mode=u+x backup=yes when: kube_network_plugin is defined and kube_network_plugin == "calico" - name: Configure calico/docker bridge diff --git a/roles/docker/tasks/install.yml b/roles/docker/tasks/install.yml index ae9c8f8eb..4880629a8 100644 --- a/roles/docker/tasks/install.yml +++ b/roles/docker/tasks/install.yml @@ -6,7 +6,7 @@ - ca-certificates - name: Configure docker apt repository - template: src=docker.list.j2 dest=/etc/apt/sources.list.d/docker.list + template: src=docker.list.j2 dest=/etc/apt/sources.list.d/docker.list backup=yes - name: Install docker-engine apt: pkg={{ item }} state=present force=yes update_cache=yes diff --git a/roles/docker/templates/docker.list.j2 b/roles/docker/templates/docker.list.j2 index 59c5b3408..2b2f4da63 100644 --- a/roles/docker/templates/docker.list.j2 +++ b/roles/docker/templates/docker.list.j2 @@ -1 +1 @@ -deb https://apt.dockerproject.org/repo debian-{{ ansible_distribution_release }} main +deb https://apt.dockerproject.org/repo {{ansible_distribution|lower}}-{{ ansible_distribution_release}} main diff --git a/roles/etcd/tasks/configure.yml b/roles/etcd/tasks/configure.yml index 97417ee97..aca67018f 100644 --- a/roles/etcd/tasks/configure.yml +++ b/roles/etcd/tasks/configure.yml @@ -6,7 +6,7 @@ file: path=/etc/systemd/system/etcd2.service.d state=directory - name: Write etcd2 config file - template: src=etcd2.j2 dest=/etc/systemd/system/etcd2.service.d/10-etcd2-cluster.conf + template: src=etcd2.j2 dest=/etc/systemd/system/etcd2.service.d/10-etcd2-cluster.conf backup=yes notify: - reload systemd - restart etcd2 diff --git a/roles/etcd/tasks/install.yml b/roles/etcd/tasks/install.yml index 462e3d917..b500d88ed 100644 --- a/roles/etcd/tasks/install.yml +++ b/roles/etcd/tasks/install.yml @@ -3,7 +3,7 @@ user: name=etcd shell=/bin/nologin home=/var/lib/etcd2 - name: Install etcd binaries - copy: + copy: src={{ local_release_dir }}/etcd/bin/{{ item }} dest={{ bin_dir }} owner=etcd @@ -21,4 +21,5 @@ template: src: systemd-etcd2.service.j2 dest: /lib/systemd/system/etcd2.service + backup: yes notify: restart daemons diff --git a/roles/kubernetes/master/tasks/config.yml b/roles/kubernetes/master/tasks/config.yml index 70c0f2d3f..b678c657d 100644 --- a/roles/kubernetes/master/tasks/config.yml +++ b/roles/kubernetes/master/tasks/config.yml @@ -18,46 +18,47 @@ proxy_token: "{{ tokens.results[3].content|b64decode }}" - name: write the config files for api server - template: src=apiserver.j2 dest={{ kube_config_dir }}/apiserver + template: src=apiserver.j2 dest={{ kube_config_dir }}/apiserver backup=yes notify: - restart daemons - name: write config file for controller-manager - template: src=controller-manager.j2 dest={{ kube_config_dir }}/controller-manager + template: src=controller-manager.j2 dest={{ kube_config_dir }}/controller-manager backup=yes notify: - restart controller-manager - name: write the kubecfg (auth) file for controller-manager - template: src=controller-manager.kubeconfig.j2 dest={{ kube_config_dir }}/controller-manager.kubeconfig + template: src=controller-manager.kubeconfig.j2 dest={{ kube_config_dir }}/controller-manager.kubeconfig backup=yes notify: - restart controller-manager - name: write the config file for scheduler - template: src=scheduler.j2 dest={{ kube_config_dir }}/scheduler + template: src=scheduler.j2 dest={{ kube_config_dir }}/scheduler backup=yes notify: - restart scheduler - name: write the kubecfg (auth) file for scheduler - template: src=scheduler.kubeconfig.j2 dest={{ kube_config_dir }}/scheduler.kubeconfig + template: src=scheduler.kubeconfig.j2 dest={{ kube_config_dir }}/scheduler.kubeconfig backup=yes notify: - restart scheduler - name: write the kubecfg (auth) file for kubectl - template: src=kubectl.kubeconfig.j2 dest={{ kube_config_dir }}/kubectl.kubeconfig + template: src=kubectl.kubeconfig.j2 dest={{ kube_config_dir }}/kubectl.kubeconfig backup=yes - name: write the config files for proxy - template: src=proxy.j2 dest={{ kube_config_dir }}/proxy + template: src=proxy.j2 dest={{ kube_config_dir }}/proxy backup=yes notify: - restart daemons - name: write the kubecfg (auth) file for proxy - template: src=proxy.kubeconfig.j2 dest={{ kube_config_dir }}/proxy.kubeconfig + template: src=proxy.kubeconfig.j2 dest={{ kube_config_dir }}/proxy.kubeconfig backup=yes - name: populate users for basic auth in API lineinfile: dest: "{{ kube_users_dir }}/known_users.csv" create: yes line: '{{ item.value.pass }},{{ item.key }},{{ item.value.role }}' + backup: yes with_dict: "{{ kube_users }}" notify: - restart apiserver diff --git a/roles/kubernetes/master/tasks/install.yml b/roles/kubernetes/master/tasks/install.yml index da6c4b7e1..c4ec6baee 100644 --- a/roles/kubernetes/master/tasks/install.yml +++ b/roles/kubernetes/master/tasks/install.yml @@ -1,29 +1,29 @@ --- - name: Write kube-apiserver systemd init file - template: src=systemd-init/kube-apiserver.service.j2 dest=/etc/systemd/system/kube-apiserver.service + template: src=systemd-init/kube-apiserver.service.j2 dest=/etc/systemd/system/kube-apiserver.service backup=yes notify: restart daemons - name: Write kube-controller-manager systemd init file - template: src=systemd-init/kube-controller-manager.service.j2 dest=/etc/systemd/system/kube-controller-manager.service + template: src=systemd-init/kube-controller-manager.service.j2 dest=/etc/systemd/system/kube-controller-manager.service backup=yes notify: restart daemons - name: Write kube-scheduler systemd init file - template: src=systemd-init/kube-scheduler.service.j2 dest=/etc/systemd/system/kube-scheduler.service + template: src=systemd-init/kube-scheduler.service.j2 dest=/etc/systemd/system/kube-scheduler.service backup=yes notify: restart daemons - name: Write kube-proxy systemd init file - template: src=systemd-init/kube-proxy.service.j2 dest=/etc/systemd/system/kube-proxy.service + template: src=systemd-init/kube-proxy.service.j2 dest=/etc/systemd/system/kube-proxy.service backup=yes notify: restart daemons - name: Install kubernetes binaries - copy: + copy: src={{ local_release_dir }}/kubernetes/bin/{{ item }} dest={{ bin_dir }} owner=kube mode=u+x with_items: - kube-apiserver - - kube-controller-manager + - kube-controller-manager - kube-scheduler - kube-proxy - kubectl diff --git a/roles/kubernetes/node/tasks/config.yml b/roles/kubernetes/node/tasks/config.yml index 3fd139e7b..27aea7c09 100644 --- a/roles/kubernetes/node/tasks/config.yml +++ b/roles/kubernetes/node/tasks/config.yml @@ -18,13 +18,13 @@ file: path=/etc/systemd/system/kubelet.service.d state=directory - name: Write kubelet config file - template: src=kubelet.j2 dest=/etc/systemd/system/kubelet.service.d/10-kubelet.conf + template: src=kubelet.j2 dest=/etc/systemd/system/kubelet.service.d/10-kubelet.conf backup=yes notify: - reload systemd - restart kubelet - name: write the kubecfg (auth) file for kubelet - template: src=kubelet.kubeconfig.j2 dest={{ kube_config_dir }}/kubelet.kubeconfig + template: src=kubelet.kubeconfig.j2 dest={{ kube_config_dir }}/kubelet.kubeconfig backup=yes notify: - restart kubelet @@ -32,13 +32,13 @@ file: path=/etc/systemd/system/kube-proxy.service.d state=directory - name: Write proxy config file - template: src=proxy.j2 dest=/etc/systemd/system/kube-proxy.service.d/10-proxy-cluster.conf + template: src=proxy.j2 dest=/etc/systemd/system/kube-proxy.service.d/10-proxy-cluster.conf backup=yes notify: - reload systemd - restart proxy - name: write the kubecfg (auth) file for kube-proxy - template: src=proxy.kubeconfig.j2 dest={{ kube_config_dir }}/proxy.kubeconfig + template: src=proxy.kubeconfig.j2 dest={{ kube_config_dir }}/proxy.kubeconfig backup=yes notify: - restart proxy diff --git a/roles/kubernetes/node/tasks/install.yml b/roles/kubernetes/node/tasks/install.yml index eaacca059..0772393ff 100644 --- a/roles/kubernetes/node/tasks/install.yml +++ b/roles/kubernetes/node/tasks/install.yml @@ -1,14 +1,14 @@ --- - name: Write kube-proxy systemd init file - template: src=systemd-init/kube-proxy.service.j2 dest=/etc/systemd/system/kube-proxy.service + template: src=systemd-init/kube-proxy.service.j2 dest=/etc/systemd/system/kube-proxy.service backup=yes notify: restart daemons - name: Write kubelet systemd init file - template: src=systemd-init/kubelet.service.j2 dest=/etc/systemd/system/kubelet.service + template: src=systemd-init/kubelet.service.j2 dest=/etc/systemd/system/kubelet.service backup=yes notify: restart daemons - name: Install kubernetes binaries - copy: + copy: src={{ local_release_dir }}/kubernetes/bin/{{ item }} dest={{ bin_dir }} owner=kube