From 8b808cab9efe64fc55436eebbb14a270d4683c43 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Sun, 13 Mar 2016 09:49:59 +0100 Subject: [PATCH] Add doc on ansible_version, fix #13204 --- docsite/rst/playbooks_variables.rst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docsite/rst/playbooks_variables.rst b/docsite/rst/playbooks_variables.rst index e0fb548d3b7..ae839663d4e 100644 --- a/docsite/rst/playbooks_variables.rst +++ b/docsite/rst/playbooks_variables.rst @@ -495,6 +495,24 @@ Here is an example of what that might look like:: In this pattern however, you could also write a fact module as well, and may wish to consider this as an option. +.. _ansible_version: + +Ansible version +``````````````` + +.. versionadded:: 2.0 + +To adapt playbook behavior to specific version of ansible, a variable ansible_version is available, with the following +structure:: + + "ansible_version": { + "full": "2.0.0.2", + "major": 2, + "minor": 0, + "revision": 0, + "string": "2.0.0.2" + } + .. _fact_caching: Fact Caching