From edc0752395c5e3afdb7fb561bfb5458e9b96c745 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Tue, 19 Apr 2016 20:00:02 +0200 Subject: [PATCH] Suggest using uri if curl is detected Some people use the command module to run curl not to download file, but to interact with remote HTTP api, and the get_url suggestion is not suitable. So adding uri in the warning would give a more meaningful warning. Suggested by Tahvok on #ansible irc channel. --- lib/ansible/modules/commands/command.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/commands/command.py b/lib/ansible/modules/commands/command.py index d45fe7050c2..374ffe279d6 100644 --- a/lib/ansible/modules/commands/command.py +++ b/lib/ansible/modules/commands/command.py @@ -139,7 +139,7 @@ def check_command(commandline): arguments = { 'chown': 'owner', 'chmod': 'mode', 'chgrp': 'group', 'ln': 'state=link', 'mkdir': 'state=directory', 'rmdir': 'state=absent', 'rm': 'state=absent', 'touch': 'state=touch' } - commands = { 'git': 'git', 'hg': 'hg', 'curl': 'get_url', 'wget': 'get_url', + commands = { 'git': 'git', 'hg': 'hg', 'curl': 'get_url or uri', 'wget': 'get_url or uri', 'svn': 'subversion', 'service': 'service', 'mount': 'mount', 'rpm': 'yum, dnf or zypper', 'yum': 'yum', 'apt-get': 'apt-get', 'tar': 'unarchive', 'unzip': 'unarchive', 'sed': 'template or lineinfile',