From 43ef13d20667175279445480473e0e4846b24923 Mon Sep 17 00:00:00 2001 From: Rick Elrod Date: Thu, 2 Jul 2020 14:26:18 -0500 Subject: [PATCH] command module, nix warnings for moved modules (#70444) Change: - Remove warnings from command module which point to modules that no longer ship with ansible-base but have moved to collections. Test Plan: - CI Signed-off-by: Rick Elrod --- changelogs/fragments/command-module-warnings.yml | 2 ++ lib/ansible/modules/command.py | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 changelogs/fragments/command-module-warnings.yml diff --git a/changelogs/fragments/command-module-warnings.yml b/changelogs/fragments/command-module-warnings.yml new file mode 100644 index 00000000000..6db7add22be --- /dev/null +++ b/changelogs/fragments/command-module-warnings.yml @@ -0,0 +1,2 @@ +minor_changes: + - "Command module: Removed suggestions to use modules which have moved to collections and out of ansible-base" diff --git a/lib/ansible/modules/command.py b/lib/ansible/modules/command.py index 5844c2d8493..f9b533a68b3 100644 --- a/lib/ansible/modules/command.py +++ b/lib/ansible/modules/command.py @@ -215,10 +215,10 @@ def check_command(module, commandline): 'rmdir': 'state=absent', 'rm': 'state=absent', 'touch': 'state=touch'} 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', + 'yum': 'yum', 'apt-get': 'apt', 'tar': 'unarchive', 'unzip': 'unarchive', 'sed': 'replace, lineinfile or template', - 'dnf': 'dnf', 'zypper': 'zypper'} - become = ['sudo', 'su', 'pbrun', 'pfexec', 'runas', 'pmrun', 'machinectl'] + 'dnf': 'dnf'} + become = ['sudo', 'su', 'runas'] if isinstance(commandline, list): command = commandline[0] else: