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
2a7f9df1
Commit
2a7f9df1
authored
Jun 05, 2013
by
Serge van Ginderachter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add support for callback_plugins/ relative to playbook
parent
1fd863cf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
2 deletions
+9
-2
lib/ansible/callbacks.py
+5
-1
lib/ansible/playbook/__init__.py
+2
-0
lib/ansible/utils/plugins.py
+2
-1
No files found.
lib/ansible/callbacks.py
View file @
2a7f9df1
...
...
@@ -41,7 +41,11 @@ if constants.DEFAULT_LOG_PATH != '':
user
=
getpass
.
getuser
()
logger
=
logging
.
getLogger
(
"p=
%
s u=
%
s | "
%
(
mypid
,
user
))
callback_plugins
=
[
x
for
x
in
utils
.
plugins
.
callback_loader
.
all
()]
callback_plugins
=
[]
def
load_callback_plugins
():
global
callback_plugins
callback_plugins
=
[
x
for
x
in
utils
.
plugins
.
callback_loader
.
all
()]
def
get_cowsay_info
():
if
constants
.
ANSIBLE_NOCOWS
is
not
None
:
...
...
lib/ansible/playbook/__init__.py
View file @
2a7f9df1
...
...
@@ -129,11 +129,13 @@ class PlayBook(object):
self
.
inventory
=
inventory
self
.
basedir
=
os
.
path
.
dirname
(
playbook
)
or
'.'
utils
.
plugins
.
push_basedir
(
self
.
basedir
)
vars
=
{}
if
self
.
inventory
.
basedir
()
is
not
None
:
vars
[
'inventory_dir'
]
=
self
.
inventory
.
basedir
()
self
.
filename
=
playbook
(
self
.
playbook
,
self
.
play_basedirs
)
=
self
.
_load_playbook_from_file
(
playbook
,
vars
)
ansible
.
callbacks
.
load_callback_plugins
()
# *****************************************************
...
...
lib/ansible/utils/plugins.py
View file @
2a7f9df1
...
...
@@ -28,7 +28,8 @@ PLUGIN_PATH_CACHE = {}
_basedirs
=
[]
def
push_basedir
(
basedir
):
_basedirs
.
insert
(
0
,
basedir
)
if
basedir
not
in
_basedirs
:
_basedirs
.
insert
(
0
,
basedir
)
class
PluginLoader
(
object
):
...
...
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