ansible/ansible — pull request #6619 by sergevanginderachter (2014-03-21 17:21:10+00:00)
Title: Introduce an ansible_version dict as runner variable

Given the version:
"1.6 (ansible_version_var 14499e8bf3) last updated 2014/03/21 17:07:50 (GMT +200)"

We get the special variable:
"ansible_version": {
"full": "1.6",
"major": 1,
"minor": 6,
"revision": 0,
"string": "1.6 (ansible_version_var 14499e8bf3) last updated 2014/03/21 17:07:50 (GMT +200)"
}

modified: lib/ansible/runner/__init__.py

also in plain bin/ansible:
$ ansible -m debug -a var=ansible_version all
localhost | success >> {
"ansible_version": {
"full": "1.6",
"major": 1,
"minor": 6,
"revision": 0,
"string": "1.6 (ansible_version_var 69ee37f7a0) last updated 2014/03/21 18:12:46 (GMT +200)"
}
}