Installation fails on Debian with sysvinit
gunnarbeutner opened this issue ยท 4 comments
Describe the bug
Installation of Zabbix fails on Debian systems which don't have systemd:
fatal: [zabbix]: FAILED! => {"changed": false, "msg": "Failed to find required executable systemctl in paths: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"}
Installation method/version
- Ansible Galaxy / 1.2.0
Ansible Version
ansible 2.7.0
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/dist-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.13 (default, Sep 26 2018, 18:42:22) [GCC 6.3.0 20170516]
Targetted hosts
Concerns the following OS(es):
- Debian stretch
Expected behavior
The module should detect that systemd is not available and fall back to using sysvinit instead.
Do you have a suggestion on how to do this?
Well, my workaround was to remove the systemd task definition and just use this:
- name: "Zabbix-server started"
service:
name: zabbix-server
state: started
enabled: yes
tags:
- zabbix-server
Then again I'm sure there was a reason for the systemd-specific task that I'm not aware of. :)
To be honest, I think that I just added the systemd
module because my "main" os is CentOS. But I just checked the zabbix-agent role and that one is using the service
module as well. So I think I should use the service
module as well. I'll create a PR for this. Thanks! ๐
That's awesome. Thanks for the help. ๐