ansible-telegraf
ansible-telegraf copied to clipboard
Don't install init script on SUSE/openSUSE systems running systemd
Describe the bug
The telegraf packages in the open build service have a systemd service file but this role installs an init script unconditionally.
Newer SUSE/openSUSE systems don't require insserv-compat to be installed and installing the init script will fail with:
Unable to enable service telegraf: Synchronizing state of telegraf.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable telegraf
/sbin/insserv: No such file or directory
Installation method/version
- Github / latest Ansible Version
ansible 2.9.27
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/jeffm/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3.8/site-packages/ansible
executable location = /usr/bin/ansible
python version = 3.8.12 (default, Aug 31 2021, 01:23:42) [GCC]
Targetted hosts Concerns the following OS(es):
- openSUSE Leap 15.3
- openSUSE Tumbleweed
Expected behavior
The role installs telegraf and enables it without error.
Additional context
I've fixed this locally and will start a PR after submitting this issue to use as a reference.
Thanks bro, really appreciated! 👍