Improve usage on SUSE releases (#155)

* Do not install init script on SUSE systems (#152)

The last SUSE releases that didn't support systemd were SLE 11 and
openSUSE 11.x.  The telegraf packages on the Open Build Service all
contain systemd service files.  openSUSE 11.x is long since dead and
buried and SLE 11 has been out of general support since mid-2019.

There are no other users of the script and it can be removed.  The
dependencies required in the molecule configuration can also be removed.

* Fix Python package dependencies on SUSE releases (#153)

The naming of the packages for the Python libxml and xml modules
on SUSE releases is a bit of a mess across releases.

SLE12 ships with Python 3.4 which is not new enough for Ansible to
use so Python 2 must be used.  Those packages are named python-xml
and python-libxml2.

SLE15 ships with Python 3.6 but the package containing the libxml2
module is named python3-libxml2-python.  The xml module is part of
python3-base and will be present if the interpreter is present.

On later releases, the package containing the libxml2 module has been
renamed python3-libxml2 but it still offers an alias for the old name.

* Add default repository handling for SUSE releases (#154)

The repositories for SUSE releases are in well-known locations
and requiring the user to specify them is unnecessary.  If the user
wishes to override the default repo using the telegraf_zypper_baseurl
that will still be honored.
This commit is contained in:
Jeff Mahoney
2022-02-24 14:32:54 -05:00
committed by GitHub
parent fd18c08145
commit a89b6aff93
5 changed files with 34 additions and 225 deletions

View File

@ -79,7 +79,11 @@ telegraf_yum_baseurl:
rocky: "https://repos.influxdata.com/rhel/{{ telegraf_redhat_releasever }}/$basearch/stable"
telegraf_yum_gpgkey: "https://repos.influxdata.com/influxdb.key"
telegraf_zypper_baseurl: "http://download.opensuse.org/repositories/devel:/languages:/go/openSUSE_Factory/"
telegraf_zypper_repos:
"opensuse tumbleweed": "http://download.opensuse.org/repositories/devel:/languages:/go/openSUSE_Factory/"
"default": "http://download.opensuse.org/repositories/devel:/languages:/go/openSUSE_Factory/"
"sles": "http://download.opensuse.org/repositories/devel:/languages:/go/SLE_{{ ansible_distribution_major_version }}_SP{{ ansible_distribution_release }}/"
"opensuse leap": "http://download.opensuse.org/repositories/devel:/languages:/go/openSUSE_Leap_{{ ansible_distribution_version }}/"
telegraf_win_install_dir: 'C:\Telegraf'
telegraf_win_logfile: 'C:\\Telegraf\\telegraf.log'