diff options
author | Christian Pointner <equinox@spreadspace.org> | 2019-09-29 00:42:21 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2019-10-10 19:27:38 +0200 |
commit | 98308448d40f3c07c4afd58cf41ba2ad6dfe7e23 (patch) | |
tree | cc81cae3a6d1810cded6c29cdf976bf64ad10661 /roles/kubernetes/base/tasks/main.yml | |
parent | sk-torrent role (diff) |
refactoring kubernetes roles
Diffstat (limited to 'roles/kubernetes/base/tasks/main.yml')
-rw-r--r-- | roles/kubernetes/base/tasks/main.yml | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/roles/kubernetes/base/tasks/main.yml b/roles/kubernetes/base/tasks/main.yml index bf62f7d2..0b0be821 100644 --- a/roles/kubernetes/base/tasks/main.yml +++ b/roles/kubernetes/base/tasks/main.yml @@ -42,30 +42,20 @@ - name: update apt cache meta: flush_handlers -- name: install basic kubernetes components +- name: install kubelet apt: name: - "kubelet{% if kubernetes.pkg_version is defined %}={{ kubernetes.pkg_version }}{% endif %}" - - "kubeadm{% if kubernetes.pkg_version is defined %}={{ kubernetes.pkg_version }}{% endif %}" - - "kubectl{% if kubernetes.pkg_version is defined %}={{ kubernetes.pkg_version }}{% endif %}" state: present -- name: disable automatic upgrades for kubernetes components +- name: disable automatic upgrades for kubelet when: kubernetes.pkg_version is defined loop: - kubelet - - kubeadm - - kubectl dpkg_selections: name: "{{ item }}" selection: hold -- name: set kubelet node-ip - lineinfile: - name: "/etc/default/kubelet" - regexp: '^KUBELET_EXTRA_ARGS=' - line: 'KUBELET_EXTRA_ARGS=--node-ip={{ kubernetes.pod_ip_range | ipsubnet(kubernetes.pod_ip_range_size, kubernetes.net_index[inventory_hostname]) | ipaddr(1) | ipaddr("address") }}' - - name: add dummy group with gid 998 group: name: app @@ -77,15 +67,3 @@ uid: 998 group: app password: "!" - -- name: add kubectl/kubeadm completion for shells - loop: - - zsh - - bash - blockinfile: - path: "/root/.{{ item }}rc" - create: yes - marker: "### {mark} ANSIBLE MANAGED BLOCK for kubectl ###" - content: | - source <(kubectl completion {{ item }}) - source <(kubeadm completion {{ item }}) |