command - add command name to warning (#74475)

This commit is contained in:
Abhijeet Kasurde 2021-04-28 19:52:15 +05:30 committed by GitHub
parent 04e57d28e3
commit 9e61952cdc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -0,0 +1,2 @@
minor_changes:
- command - update the user warning message to point out command name (https://github.com/ansible/ansible/pull/74475).

View file

@ -232,9 +232,9 @@ def check_command(module, commandline):
command = commandline.split()[0] command = commandline.split()[0]
command = os.path.basename(command) command = os.path.basename(command)
disable_suffix = "If you need to use command because {mod} is insufficient you can add" \ disable_suffix = "If you need to use '{cmd}' because the {mod} module is insufficient you can add" \
" 'warn: false' to this command task or set 'command_warnings=False' in" \ " 'warn: false' to this command task or set 'command_warnings=False' in" \
" ansible.cfg to get rid of this message." " the defaults section of ansible.cfg to get rid of this message."
substitutions = {'mod': None, 'cmd': command} substitutions = {'mod': None, 'cmd': command}
if command in arguments: if command in arguments: