diff --git a/changelogs/fragments/cmd_wording.yml b/changelogs/fragments/cmd_wording.yml new file mode 100644 index 00000000000..95da8ca2dd4 --- /dev/null +++ b/changelogs/fragments/cmd_wording.yml @@ -0,0 +1,2 @@ +minor_changes: +- command - update the user warning message to point out command name (https://github.com/ansible/ansible/pull/74475). diff --git a/lib/ansible/modules/command.py b/lib/ansible/modules/command.py index e95fbdfc2e0..1ccd3388b26 100644 --- a/lib/ansible/modules/command.py +++ b/lib/ansible/modules/command.py @@ -232,9 +232,9 @@ def check_command(module, commandline): command = commandline.split()[0] 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" \ - " 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} if command in arguments: