diff options
author | Michael Scherer <mscherer@users.noreply.github.com> | 2016-04-19 20:00:02 +0200 |
---|---|---|
committer | René Moser <mail@renemoser.net> | 2016-04-19 20:00:02 +0200 |
commit | b5ef21ef897a6ad8f599d6b4b3686630d43f53c0 (patch) | |
tree | 972b30946d2432e5ded43aa74a39be0c9410437f /commands/command.py | |
parent | c1787da7ff395a47cf1cfa4bcc7e92c082add06a (diff) | |
download | ansible-modules-core-b5ef21ef897a6ad8f599d6b4b3686630d43f53c0.tar.gz |
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.
Diffstat (limited to 'commands/command.py')
-rw-r--r-- | commands/command.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/commands/command.py b/commands/command.py index 26fa43df..6535916c 100644 --- a/commands/command.py +++ b/commands/command.py @@ -137,7 +137,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', |