apt_repository: fix update cache after state=changed. Closes GH-4136

reviewable/pr18780/r1
René Moser 11 years ago
parent ff3ffd21b4
commit 53d06b932a

@ -69,6 +69,7 @@ import re
import tempfile
try:
import apt
import apt_pkg
import aptsources.distro
distro = aptsources.distro.get_distro()
@ -365,6 +366,8 @@ def main():
if not module.check_mode and changed:
try:
sourceslist.save(module)
cache = apt.Cache()
cache.update()
except OSError as err:
module.fail_json(msg=unicode(err))

Loading…
Cancel
Save