-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix to extend OS support using the distro (#20)
* Fix to extend OS support using the distro * incorporated review comments
- Loading branch information
1 parent
dbd57d1
commit 4e59986
Showing
3 changed files
with
14 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
"""Initialize wavefront cli version.""" | ||
__version__ = '0.0.118' | ||
__version__ = '0.0.119' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,24 +23,21 @@ def get_install_agent_cmd(): | |
" [email protected].") | ||
return cmd | ||
|
||
if dist.strip() in ("Oracle Linux Server", "Fedora", | ||
"Red Hat Enterprise Linux Server", | ||
"Red Hat Enterprise Linux Workstation", | ||
"CentOS", "CentOS Linux" | ||
) or dist.startswith("Amazon Linux"): | ||
if dist.strip().startswith(("Oracle Linux Server", "Fedora", | ||
"Amazon Linux", "CentOS", | ||
"Red Hat Enterprise Linux")): | ||
cmd = "curl -s %s | bash" % (agent_pkg_rpm) | ||
cmd += " && yum -y -q install telegraf" | ||
elif dist == "Ubuntu": | ||
elif dist.strip().startswith("Ubuntu"): | ||
cmd = "curl -s %s | bash" % (agent_pkg_deb) | ||
cmd += ' && apt-get -y -qq -o Dpkg::Options::="--force-confold"' \ | ||
' install telegraf' | ||
elif dist == "debian": | ||
elif dist.strip().lower().startswith("debian"): | ||
cmd = "curl -s %s | bash" % (agent_pkg_deb) | ||
cmd += ' && apt-get -o Dpkg::Options::="--force-confnew"' \ | ||
' -y install telegraf' | ||
elif dist.strip() == "openSUSE" or\ | ||
dist.strip() == "SUSE Linux Enterprise Server" or \ | ||
dist.strip() == "SLES": | ||
elif dist.strip().startswith(("openSUSE", "SUSE Linux Enterprise Server", | ||
"SLES")): | ||
cmd = "curl -s %s | bash" % (agent_pkg_rpm) | ||
cmd += ' && zypper install telegraf' | ||
else: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters