From ef25367353b3b01813a8b2681c3f9b08227fc5e9 Mon Sep 17 00:00:00 2001 From: Yeuk Hon Wong Date: Mon, 2 Oct 2017 17:33:13 -0400 Subject: [PATCH] Fixes #30073: Remove 'Consider hg command' warning. (#31159) This PR addresses two issues: 1. The hg module was added to command module's check_command list, so if someone runs hg directly from the command module, the command module would warn the user "Consider using hg module rather than running hg". We address this by removing hg from the list. 2. We added a new note to tell users push feature will be addressed in issue #31156. --- lib/ansible/modules/commands/command.py | 2 +- lib/ansible/modules/source_control/hg.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/commands/command.py b/lib/ansible/modules/commands/command.py index b42cdafdb25..863822b6179 100644 --- a/lib/ansible/modules/commands/command.py +++ b/lib/ansible/modules/commands/command.py @@ -124,7 +124,7 @@ def check_command(module, commandline): arguments = {'chown': 'owner', 'chmod': 'mode', 'chgrp': 'group', 'ln': 'state=link', 'mkdir': 'state=directory', 'rmdir': 'state=absent', 'rm': 'state=absent', 'touch': 'state=touch'} - commands = {'hg': 'hg', 'curl': 'get_url or uri', 'wget': 'get_url or uri', + commands = {'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', 'tar': 'unarchive', 'unzip': 'unarchive', 'sed': 'template or lineinfile', diff --git a/lib/ansible/modules/source_control/hg.py b/lib/ansible/modules/source_control/hg.py index 04e3b21277e..accf0740dd7 100644 --- a/lib/ansible/modules/source_control/hg.py +++ b/lib/ansible/modules/source_control/hg.py @@ -78,6 +78,7 @@ options: - Path to hg executable to use. If not supplied, the normal mechanism for resolving binary paths will be used. notes: + - "This module does not support push capability. See U(https://github.com/ansible/ansible/issues/31156)." - "If the task seems to be hanging, first verify remote host is in C(known_hosts). SSH will prompt user to authorize the first contact with a remote host. To avoid this prompt, one solution is to add the remote host public key in C(/etc/ssh/ssh_known_hosts) before calling