Merge pull request #2926 from mattclay/apt-unsafe
Split shell command to avoid use_unsafe_shell.
This commit is contained in:
commit
7d2fd4e944
1 changed files with 2 additions and 1 deletions
|
@ -582,7 +582,8 @@ def main():
|
|||
if module.check_mode:
|
||||
module.fail_json(msg="python-apt must be installed to use check mode. If run normally this module can autoinstall it")
|
||||
try:
|
||||
module.run_command('apt-get update && apt-get install python-apt -y -q --force-yes', use_unsafe_shell=True, check_rc=True)
|
||||
module.run_command('apt-get update', check_rc=True)
|
||||
module.run_command('apt-get install python-apt -y -q', check_rc=True)
|
||||
global apt, apt_pkg
|
||||
import apt
|
||||
import apt.debfile
|
||||
|
|
Loading…
Reference in a new issue