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
6277e770
Commit
6277e770
authored
Oct 25, 2013
by
Serge van Ginderachter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
include basedir as 'playbook_dir' variable
closes #4246
parent
b803aac6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
0 deletions
+3
-0
lib/ansible/playbook/__init__.py
+1
-0
lib/ansible/playbook/play.py
+1
-0
lib/ansible/runner/__init__.py
+1
-0
No files found.
lib/ansible/playbook/__init__.py
View file @
6277e770
...
...
@@ -138,6 +138,7 @@ class PlayBook(object):
self
.
basedir
=
os
.
path
.
dirname
(
playbook
)
or
'.'
utils
.
plugins
.
push_basedir
(
self
.
basedir
)
vars
=
extra_vars
.
copy
()
vars
[
'playbook_dir'
]
=
self
.
basedir
if
self
.
inventory
.
basedir
()
is
not
None
:
vars
[
'inventory_dir'
]
=
self
.
inventory
.
basedir
()
...
...
lib/ansible/playbook/play.py
View file @
6277e770
...
...
@@ -123,6 +123,7 @@ class Play(object):
self
.
max_fail_pct
=
int
(
ds
.
get
(
'max_fail_percentage'
,
100
))
load_vars
=
{}
load_vars
[
'playbook_dir'
]
=
self
.
basedir
if
self
.
playbook
.
inventory
.
basedir
()
is
not
None
:
load_vars
[
'inventory_dir'
]
=
self
.
playbook
.
inventory
.
basedir
()
...
...
lib/ansible/runner/__init__.py
View file @
6277e770
...
...
@@ -415,6 +415,7 @@ class Runner(object):
inject
[
'vars'
]
=
self
.
module_vars
inject
[
'defaults'
]
=
self
.
default_vars
inject
[
'environment'
]
=
self
.
environment
inject
[
'playbook_dir'
]
=
self
.
basedir
if
self
.
inventory
.
basedir
()
is
not
None
:
inject
[
'inventory_dir'
]
=
self
.
inventory
.
basedir
()
...
...
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