Skip to content

Commit

Permalink
command warnings: don't send the param from action
Browse files Browse the repository at this point in the history
Change:
- Followup to #70504. We need to not pass the 'warn' parameter from the
  action plugin either, unless it's True. Otherwise, even though it
  defaults to false, we always show the deprecation.

Test Plan:
- Local

Signed-off-by: Rick Elrod <rick@elrod.me>
  • Loading branch information
relrod committed Jul 8, 2020
1 parent b0d9dee commit 75b734f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ansible/plugins/action/command.py
Expand Up @@ -17,7 +17,7 @@ def run(self, tmp=None, task_vars=None):
del tmp # tmp no longer has any effect

# Command module has a special config option to turn off the command nanny warnings
if 'warn' not in self._task.args:
if 'warn' not in self._task.args and C.COMMAND_WARNINGS:
self._task.args['warn'] = C.COMMAND_WARNINGS

wrap_async = self._task.async_val and not self._connection.has_native_async
Expand Down

0 comments on commit 75b734f

Please sign in to comment.