Skip to content
Snippets Groups Projects
Commit fb7899d2 authored by nimrod's avatar nimrod
Browse files

Added nginx_facts module, for now it's just the major, minor and patch version.

parent 8abc2d46
No related branches found
No related tags found
No related merge requests found
#!/bin/sh -e
. "$1"
fail ()
{
echo "{\"failed\": true, \"msg\": \"$1\"}"
exit
}
which nginx || fail "Can't find nginx executable."
nginx -v 2>&1 | sed 's/[a-zA-Z :\/]*\([0-9]*\)\.\([0-9]*\)\.\([0-9]\)*/{"changed": false, "ansible_facts": {"nginx": {"major":\1, "minor":\2, "patch":\3}}}/g'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment