diff --git a/lib/ansible/modules/extras/packaging/os/portage.py b/lib/ansible/modules/extras/packaging/os/portage.py index 124008c652..b47a9d32a2 100644 --- a/lib/ansible/modules/extras/packaging/os/portage.py +++ b/lib/ansible/modules/extras/packaging/os/portage.py @@ -252,6 +252,8 @@ def emerge_packages(module, packages): break else: module.exit_json(changed=False, msg='Packages already present.') + if module.check_mode: + module.exit_json(changed=True, msg='Packages would be installed.') args = [] emerge_flags = {