Skip to content

Commit

Permalink
Slightly trim down the warnings list based on some things being prett…
Browse files Browse the repository at this point in the history
…y common

for local usage.
  • Loading branch information
Michael DeHaan committed Aug 22, 2014
1 parent ab8490d commit fcb610d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
8 changes: 8 additions & 0 deletions examples/ansible.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ def on_ok(self, host, host_result):
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("warning: %s" % warning, color='purple', runner=self.runner)
super(PlaybookRunnerCallbacks, self).on_ok(host, host_result)

def on_skipped(self, host, item=None):
Expand Down
1 change: 0 additions & 1 deletion library/commands/command
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit fcb610d

Please sign in to comment.