From d9a29f394f4f072a3659bc5e261dc24fa451cf25 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Sun, 25 Oct 2015 17:02:25 -0400 Subject: [PATCH] fixed missed passing use-sudo --- lib/ansible/modules/extras/packaging/language/cpanm.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/ansible/modules/extras/packaging/language/cpanm.py b/lib/ansible/modules/extras/packaging/language/cpanm.py index 10bb66522ae..e4e8624118c 100644 --- a/lib/ansible/modules/extras/packaging/language/cpanm.py +++ b/lib/ansible/modules/extras/packaging/language/cpanm.py @@ -111,8 +111,7 @@ def _is_package_installed(module, name, locallib, cpanm): else: return False -def _build_cmd_line(name, from_path, notest, locallib, mirror, mirror_only, - installdeps, cpanm): +def _build_cmd_line(name, from_path, notest, locallib, mirror, mirror_only, installdeps, cpanm, use_sudo): # this code should use "%s" like everything else and just return early but not fixing all of it now. # don't copy stuff like this if from_path: @@ -174,8 +173,7 @@ def main(): if not installed: out_cpanm = err_cpanm = '' - cmd = _build_cmd_line(name, from_path, notest, locallib, mirror, - mirror_only, installdeps, cpanm) + cmd = _build_cmd_line(name, from_path, notest, locallib, mirror, mirror_only, installdeps, cpanm, use_sudo) rc_cpanm, out_cpanm, err_cpanm = module.run_command(cmd, check_rc=False)