mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-04 15:40:20 -07:00
Show error if python-apt is absent in check mode.
Previously this would fail with an exception which did not clearly explain the reason for the failure.
This commit is contained in:
parent
f6aa1ff9a4
commit
b02eb232b0
1 changed files with 2 additions and 0 deletions
|
@ -129,6 +129,8 @@ def install_python_apt(module):
|
||||||
HAVE_PYTHON_APT = True
|
HAVE_PYTHON_APT = True
|
||||||
else:
|
else:
|
||||||
module.fail_json(msg="Failed to auto-install python-apt. Error was: '%s'" % se.strip())
|
module.fail_json(msg="Failed to auto-install python-apt. Error was: '%s'" % se.strip())
|
||||||
|
else:
|
||||||
|
module.fail_json(msg="python-apt must be installed to use check mode")
|
||||||
|
|
||||||
class InvalidSource(Exception):
|
class InvalidSource(Exception):
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue