Return the nginx version without prefix

This commit is contained in:
Frank Klaassen 2018-10-10 08:21:30 +02:00 committed by Megan Wilhite
parent b333d95f3f
commit 44e633d7d8
2 changed files with 2 additions and 1 deletions

1
changelog/57111.changed Normal file
View file

@ -0,0 +1 @@
Changed nginx.version to return version without `nginx/` prefix.

View file

@ -47,7 +47,7 @@ def version():
"""
cmd = "{0} -v".format(__detect_os())
out = __salt__["cmd.run"](cmd).splitlines()
ret = out[0].split(": ")
ret = out[0].split(": ")[-1].split("/")
return ret[-1]