command - add command name to warning (#74475)
This commit is contained in:
parent
04e57d28e3
commit
9e61952cdc
2 changed files with 4 additions and 2 deletions
2
changelogs/fragments/cmd_wording.yml
Normal file
2
changelogs/fragments/cmd_wording.yml
Normal 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).
|
|
@ -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:
|
||||||
|
|
Loading…
Reference in a new issue