expanded info on fail on check + missing apt-python
it now explains that apt module will auto install
This commit is contained in:
parent
feb309e3cf
commit
2ed38b79cb
1 changed files with 1 additions and 1 deletions
|
@ -580,7 +580,7 @@ def main():
|
||||||
|
|
||||||
if not HAS_PYTHON_APT:
|
if not HAS_PYTHON_APT:
|
||||||
if module.check_mode:
|
if module.check_mode:
|
||||||
module.fail_json(msg="python-apt must be installed to use check mode")
|
module.fail_json(msg="python-apt must be installed to use check mode. If run normally this module can autoinstall it")
|
||||||
try:
|
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 && apt-get install python-apt -y -q --force-yes', use_unsafe_shell=True, check_rc=True)
|
||||||
global apt, apt_pkg
|
global apt, apt_pkg
|
||||||
|
|
Loading…
Reference in a new issue