From 8292cadc7fe0c6d9e6f483181aee74431b9bbb4a Mon Sep 17 00:00:00 2001 From: Matthew Gamble Date: Tue, 20 Dec 2016 14:17:47 +1100 Subject: [PATCH] Tell pacman not to display progress bars Displaying progress bars is not recommended for any scripted usage of pacman, such as the ansible pacman module. --- lib/ansible/modules/packaging/os/pacman.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ansible/modules/packaging/os/pacman.py b/lib/ansible/modules/packaging/os/pacman.py index 1642f3ed60..c20b97c4ad 100644 --- a/lib/ansible/modules/packaging/os/pacman.py +++ b/lib/ansible/modules/packaging/os/pacman.py @@ -223,7 +223,7 @@ def remove_packages(module, pacman_path, packages): if not installed: continue - cmd = "%s -%s %s --noconfirm" % (pacman_path, args, package) + cmd = "%s -%s %s --noconfirm --noprogressbar" % (pacman_path, args, package) rc, stdout, stderr = module.run_command(cmd, check_rc=False) if rc != 0: @@ -260,7 +260,7 @@ def install_packages(module, pacman_path, state, packages, package_files): to_install_repos.append(package) if to_install_repos: - cmd = "%s -S %s --noconfirm --needed" % (pacman_path, " ".join(to_install_repos)) + cmd = "%s -S %s --noconfirm --noprogressbar --needed" % (pacman_path, " ".join(to_install_repos)) rc, stdout, stderr = module.run_command(cmd, check_rc=False) if rc != 0: @@ -269,7 +269,7 @@ def install_packages(module, pacman_path, state, packages, package_files): install_c += len(to_install_repos) if to_install_files: - cmd = "%s -U %s --noconfirm --needed" % (pacman_path, " ".join(to_install_files)) + cmd = "%s -U %s --noconfirm --noprogressbar --needed" % (pacman_path, " ".join(to_install_files)) rc, stdout, stderr = module.run_command(cmd, check_rc=False) if rc != 0: module.fail_json(msg="failed to install %s: %s" % (" ".join(to_install_files), stderr))