mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-03-06 18:17:47 +03:00
use ansible_service_mgr to detect init system
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
src: "kube-apiserver.service.j2"
|
||||
dest: "/etc/systemd/system/kube-apiserver.service"
|
||||
backup: yes
|
||||
when: init_system == "systemd"
|
||||
when: ansible_service_mgr == "systemd"
|
||||
notify: restart kube-apiserver
|
||||
|
||||
- name: install | Write kube-apiserver initd script
|
||||
@@ -28,7 +28,7 @@
|
||||
owner: root
|
||||
mode: 0755
|
||||
backup: yes
|
||||
when: init_system == "sysvinit" and ansible_os_family == "Debian"
|
||||
when: ansible_service_mgr in ["sysvinit","upstart"] and ansible_os_family == "Debian"
|
||||
|
||||
- name: Write kube-apiserver config file
|
||||
template:
|
||||
|
||||
Reference in New Issue
Block a user