diff --git a/examples/ansible.cfg b/examples/ansible.cfg index 61e1f61234..9113472406 100644 --- a/examples/ansible.cfg +++ b/examples/ansible.cfg @@ -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 diff --git a/lib/ansible/callbacks.py b/lib/ansible/callbacks.py index 2fe3433626..ca78b3adfb 100644 --- a/lib/ansible/callbacks.py +++ b/lib/ansible/callbacks.py @@ -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("warning: %s" % warning, color='purple', runner=self.runner) super(PlaybookRunnerCallbacks, self).on_ok(host, host_result) def on_skipped(self, host, item=None): diff --git a/library/commands/command b/library/commands/command index 66abb759ee..b94a523389 100644 --- a/library/commands/command +++ b/library/commands/command @@ -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])