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
fcb610de
Commit
fcb610de
authored
Aug 22, 2014
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Slightly trim down the warnings list based on some things being pretty common
for local usage.
parent
ab8490d0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
2 deletions
+9
-2
examples/ansible.cfg
+8
-0
lib/ansible/callbacks.py
+1
-1
library/commands/command
+0
-1
No files found.
examples/ansible.cfg
View file @
fcb610de
...
...
@@ -102,6 +102,14 @@ ansible_managed = Ansible managed: {file} modified on %Y-%m-%d %H:%M:%S by {uid}
# to disable these warnings, set the following value to False:
#deprecation_warnings = True
# by default (as of 1.8), Ansible will warn when usage of the shell and
# command module appear to be simplified by using a default Ansible module
# instead. These warnings can be silenced by adjusting the following
# setting or adding warn=yes or warn=no to the end of the command line
# parameter string.
# command_warnings = True
# set plugin path directories here, separate with colons
action_plugins = /usr/share/ansible_plugins/action_plugins
callback_plugins = /usr/share/ansible_plugins/callback_plugins
...
...
lib/ansible/callbacks.py
View file @
fcb610de
...
...
@@ -537,7 +537,7 @@ class PlaybookRunnerCallbacks(DefaultRunnerCallbacks):
display
(
msg
,
color
=
'yellow'
,
runner
=
self
.
runner
)
if
constants
.
COMMAND_WARNINGS
and
'warnings'
in
host_result2
and
host_result2
[
'warnings'
]:
for
warning
in
host_result2
[
'warnings'
]:
display
(
"warn:
%
s"
%
warning
,
color
=
'purple'
,
runner
=
self
.
runner
)
display
(
"warn
ing
:
%
s"
%
warning
,
color
=
'purple'
,
runner
=
self
.
runner
)
super
(
PlaybookRunnerCallbacks
,
self
)
.
on_ok
(
host
,
host_result
)
def
on_skipped
(
self
,
host
,
item
=
None
):
...
...
library/commands/command
View file @
fcb610de
...
...
@@ -125,7 +125,6 @@ def check_command(commandline):
'svn'
:
'subversion'
,
'service'
:
'service'
,
'mount'
:
'mount'
,
'rpm'
:
'yum'
,
'yum'
:
'yum'
,
'apt-get'
:
'apt-get'
,
'tar'
:
'unarchive'
,
'unzip'
:
'unarchive'
,
'sed'
:
'template or lineinfile'
,
'echo'
:
'template or lineinfile'
,
'cp'
:
'synchronize or copy'
,
'rsync'
:
'synchronize'
}
warnings
=
list
()
command
=
os
.
path
.
basename
(
commandline
.
split
()[
0
])
...
...
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