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
f1eb195f
Commit
f1eb195f
authored
Mar 01, 2013
by
Daniel Hokka Zakrisson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vars_loader should get the path to the inventory + vars_plugins
parent
ad089959
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
lib/ansible/inventory/__init__.py
+1
-1
lib/ansible/utils/plugins.py
+3
-1
No files found.
lib/ansible/inventory/__init__.py
View file @
f1eb195f
...
...
@@ -92,7 +92,7 @@ class Inventory(object):
else
:
raise
errors
.
AnsibleError
(
"YAML inventory support is deprecated in 0.6 and removed in 0.7, see the migration script in examples/scripts in the git checkout"
)
utils
.
plugins
.
vars_loader
.
add_directory
(
self
.
basedir
())
utils
.
plugins
.
vars_loader
.
add_directory
(
self
.
basedir
()
,
with_subdir
=
True
)
else
:
raise
errors
.
AnsibleError
(
"Unable to find an inventory file, specify one with -i ?"
)
...
...
lib/ansible/utils/plugins.py
View file @
f1eb195f
...
...
@@ -68,9 +68,11 @@ class PluginLoader(object):
ret
+=
self
.
_get_package_path
()
return
ret
def
add_directory
(
self
,
directory
):
def
add_directory
(
self
,
directory
,
with_subdir
=
False
):
"""Adds an additional directory to the search path"""
if
directory
is
not
None
:
if
with_subdir
:
directory
=
os
.
path
.
join
(
directory
,
self
.
subdir
)
self
.
_extra_dirs
.
append
(
directory
)
def
print_paths
(
self
):
...
...
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