---
- name: Join on workers
  command: >
          kubeadm join --ignore-preflight-errors=all
          --token {{ k8s_init_token }}
          --discovery-token-unsafe-skip-ca-verification master:6443

- name: Add feature gates to kubelet
  lineinfile:
    path: /etc/systemd/system/kubelet.service.d/10-kubeadm.conf
    line: >
      Environment="KUBELET_EXTRA_ARGS=
      --feature-gates={{ feature_gates|join(',') }}"
    insertafter: "^Environment="
    state: present

- name: Restart kubelet
  systemd:
    name: kubelet
    daemon_reload: true
    state: restarted

---
- name: Join on workers
  command: >
          kubeadm join --ignore-preflight-errors=all
          --token {{ k8s_init_token }}
          --discovery-token-unsafe-skip-ca-verification master:6443

- name: Add feature gates to kubelet
  lineinfile:
    path: /etc/sysconfig/kubelet
    regexp: '^KUBELET_EXTRA_ARGS'
    line: >
      KUBELET_EXTRA_ARGS=--feature-gates={{ feature_gates|join(',') }}
    state: present

- name: Restart kubelet
  systemd:
    name: kubelet
    daemon_reload: true
    state: restarted

Add kubelet feature flags to the sysconfig file
Add kubelet feature flags to the sysconfig file

Tested with kubernetes versions 1.13.0 and 1.13.5.

Signed-off-by: ShyamsundarR <a66bd9d22fa4c9ed39b8c456e41d73cd52b5e2f8@redhat.com>
