mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-03-04 10:11:10 -03:30
use ansible_service_mgr to detect init system
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
- name : reload systemd
|
||||
shell: systemctl daemon-reload
|
||||
when: init_system == "systemd"
|
||||
when: ansible_service_mgr == "systemd"
|
||||
|
||||
- name: restart weave
|
||||
command: /bin/true
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
src: systemd-docker.service
|
||||
dest: /lib/systemd/system/docker.service
|
||||
notify: restart docker
|
||||
when: init_system == "systemd"
|
||||
when: ansible_service_mgr == "systemd"
|
||||
|
||||
- meta: flush_handlers
|
||||
|
||||
@@ -41,17 +41,17 @@
|
||||
|
||||
- name: Weave | Write weave systemd init file
|
||||
template: src=weave.service.j2 dest=/etc/systemd/system/weave.service
|
||||
when: init_system == "systemd"
|
||||
when: ansible_service_mgr == "systemd"
|
||||
notify: restart systemd-weave
|
||||
|
||||
- name: Weave | Write weaveproxy systemd init file
|
||||
template: src=weaveproxy.service.j2 dest=/etc/systemd/system/weaveproxy.service
|
||||
when: init_system == "systemd"
|
||||
when: ansible_service_mgr == "systemd"
|
||||
notify: restart systemd-weaveproxy
|
||||
|
||||
- name: Weave | Write weaveexpose systemd init file
|
||||
template: src=weaveexpose.service.j2 dest=/etc/systemd/system/weaveexpose.service
|
||||
when: init_system == "systemd"
|
||||
when: ansible_service_mgr == "systemd"
|
||||
notify: restart systemd-weaveexpose
|
||||
|
||||
- name: Weave | Enable weave
|
||||
|
||||
Reference in New Issue
Block a user