<p>I am following instructions on <a href="https://kubernetes.io/blog/2019/03/15/kubernetes-setup-using-ansible-and-vagrant/" rel="nofollow noreferrer">site</a>  to spin up a multi-node kubernetes cluster using vagrant/ansible. Unfortunately, I get following error:</p>

<pre><code>TASK [Configure node ip] *******************************************************
fatal: [k8s-master]: FAILED! =&gt; {"changed": false, "msg": "Destination /etc/default/kubelet does not exist !", "rc": 257}
</code></pre>

<p>The relevant passage in the Vagrantfile is:</p>

<pre><code>- name: Install Kubernetes binaries
    apt:
      name: "{{ packages }}"
      state: present
      update_cache: yes
    vars:
      packages:
        - kubelet
        - kubeadm
        - kubectl

  - name: Configure node ip
    lineinfile:
      path: /etc/default/kubelet
      line: KUBELET_EXTRA_ARGS=--node-ip={{ node_ip }}
</code></pre>

<p>Is it just the wrong path? Which one would it be then ?</p>

<p>P.S.: I also get a warning beforehand indicating:</p>

<pre><code>[WARNING]: Could not find aptitude. Using apt-get instead
</code></pre>

<p>Is it not installing the kubelet package and might that be the reason why it doesn't find the file ? How to fix it in that case ?</p>

<p>Updating the node ip in the config file is not required. If you still wanted to change for any specific reason, below is the solution. </p>

<p>You can change the file to <code>/etc/systemd/system/kubelet.service.d/10-kubeadm.conf</code> as per the <a href="https://github.com/kubernetes/release/issues/654" rel="noreferrer">change</a> </p>

<p>Before you change, please check if this file exists in the nodes. </p>

<p><code>/etc/default/kubelet</code> is for yum package. </p>
