Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
cf2a66ef
Commit
cf2a66ef
authored
Jul 10, 2015
by
James Cammarata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add ansible_version magic variable
Fixes #11545
parent
b0e6baf8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
lib/ansible/vars/__init__.py
+3
-0
No files found.
lib/ansible/vars/__init__.py
View file @
cf2a66ef
...
...
@@ -30,6 +30,7 @@ except ImportError:
from
sha
import
sha
as
sha1
from
ansible
import
constants
as
C
from
ansible.cli
import
CLI
from
ansible.errors
import
*
from
ansible.parsing
import
DataLoader
from
ansible.plugins.cache
import
FactCache
...
...
@@ -244,6 +245,8 @@ class VariableManager:
# the 'omit' value alows params to be left out if the variable they are based on is undefined
all_vars
[
'omit'
]
=
self
.
_omit_token
all_vars
[
'ansible_version'
]
=
CLI
.
version_info
(
gitinfo
=
False
)
# make vars self referential, so people can do things like 'vars[var_name]'
copied_vars
=
all_vars
.
copy
()
if
'hostvars'
in
copied_vars
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment