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

Added collectd_facts module (just version for now).

parent fb7899d2
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 collectd || fail "Can't find collectd executable."
collectd -h | sed -n 's/[a-zA-Z]*\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/{"changed": false, "ansible_facts": {"nginx": {"major":\1, "minor":\2, "patch":\3}}}/p'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment