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
46bf3d1b
Commit
46bf3d1b
authored
Sep 10, 2015
by
Toshio Kuratomi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove plugin._basedirs as we now use different data structures to achieve that functionality.
parent
e6c9efec
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
31 deletions
+2
-31
lib/ansible/plugins/__init__.py
+0
-28
lib/ansible/plugins/strategies/__init__.py
+1
-2
lib/ansible/template/__init__.py
+1
-1
No files found.
lib/ansible/plugins/__init__.py
View file @
46bf3d1b
...
...
@@ -40,18 +40,6 @@ except ImportError:
MODULE_CACHE
=
{}
PATH_CACHE
=
{}
PLUGIN_PATH_CACHE
=
{}
_basedirs
=
[]
# FIXME: the _basedirs code may be dead, and no longer needed, as
# we now use add_directory for all plugin types here instead
# of relying on this global variable (which also causes problems
# with forked processes). See the Playbook() and Role() classes
# for how we now ue get_all_plugin_loaders() below.
def
push_basedir
(
basedir
):
# avoid pushing the same absolute dir more than once
basedir
=
to_unicode
(
os
.
path
.
realpath
(
basedir
))
if
basedir
not
in
_basedirs
:
_basedirs
.
insert
(
0
,
basedir
)
def
get_all_plugin_loaders
():
return
[(
name
,
obj
)
for
(
name
,
obj
)
in
inspect
.
getmembers
(
sys
.
modules
[
__name__
])
if
isinstance
(
obj
,
PluginLoader
)]
...
...
@@ -165,22 +153,6 @@ class PluginLoader:
return
self
.
_paths
ret
=
self
.
_extra_dirs
[:]
for
basedir
in
_basedirs
:
fullpath
=
os
.
path
.
realpath
(
os
.
path
.
join
(
basedir
,
self
.
subdir
))
if
os
.
path
.
isdir
(
fullpath
):
files
=
glob
.
glob
(
"
%
s/*"
%
fullpath
)
# allow directories to be two levels deep
files2
=
glob
.
glob
(
"
%
s/*/*"
%
fullpath
)
if
files2
is
not
None
:
files
.
extend
(
files2
)
for
file
in
files
:
if
os
.
path
.
isdir
(
file
)
and
file
not
in
ret
:
ret
.
append
(
file
)
if
fullpath
not
in
ret
:
ret
.
append
(
fullpath
)
# look in any configured plugin paths, allow one level deep for subcategories
if
self
.
config
is
not
None
:
...
...
lib/ansible/plugins/strategies/__init__.py
View file @
46bf3d1b
...
...
@@ -33,7 +33,7 @@ from ansible.playbook.handler import Handler
from
ansible.playbook.helpers
import
load_list_of_blocks
from
ansible.playbook.included_file
import
IncludedFile
from
ansible.playbook.role
import
hash_params
from
ansible.plugins
import
_basedirs
,
action_loader
,
connection_loader
,
filter_loader
,
lookup_loader
,
module_loader
from
ansible.plugins
import
action_loader
,
connection_loader
,
filter_loader
,
lookup_loader
,
module_loader
from
ansible.template
import
Templar
try
:
...
...
@@ -53,7 +53,6 @@ class SharedPluginLoaderObj:
the forked processes over the queue easier
'''
def
__init__
(
self
):
self
.
basedirs
=
_basedirs
[:]
self
.
action_loader
=
action_loader
self
.
connection_loader
=
connection_loader
self
.
filter_loader
=
filter_loader
...
...
lib/ansible/template/__init__.py
View file @
46bf3d1b
...
...
@@ -31,7 +31,7 @@ from jinja2.runtime import StrictUndefined
from
ansible
import
constants
as
C
from
ansible.errors
import
AnsibleError
,
AnsibleFilterError
,
AnsibleUndefinedVariable
from
ansible.plugins
import
_basedirs
,
filter_loader
,
lookup_loader
,
test_loader
from
ansible.plugins
import
filter_loader
,
lookup_loader
,
test_loader
from
ansible.template.safe_eval
import
safe_eval
from
ansible.template.template
import
AnsibleJ2Template
from
ansible.template.vars
import
AnsibleJ2Vars
...
...
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