diff --git a/tasks/main.yml b/tasks/main.yml index 72d040c..638f7f9 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -22,7 +22,14 @@ regexp: 'Environment="KUBELET_EXTRA_ARGS=' insertafter: '^Environment=' state: present - notify: restart kubelet + register: kubelet_unit_file + +- name: Reload systemd unit if args were changed. + systemd: + state: restarted + daemon_reload: yes + name: kubelet + when: kubelet_unit_file is changed - name: Ensure kubelet is started and enabled at boot. service: