From 5fdd2a7b01cb049574a9d73e93707ae9bbada02f Mon Sep 17 00:00:00 2001 From: Andrew DeMaria Date: Sat, 12 Jul 2014 10:57:30 -0500 Subject: [PATCH] Fix #8047 Ensure that json is returned when only updating the cache and in check mode --- library/packaging/pacman | 3 +++ 1 file changed, 3 insertions(+) diff --git a/library/packaging/pacman b/library/packaging/pacman index 5bf2d931e6e..0b23a2f93ce 100644 --- a/library/packaging/pacman +++ b/library/packaging/pacman @@ -204,6 +204,9 @@ def main(): if not p['name']: module.exit_json(changed=True, msg='updated the package master lists') + if p['update_cache'] and module.check_mode and not p['name']: + module.exit_json(changed=True, msg='Would have updated the package cache') + if p['name']: pkgs = p['name'].split(',')