the apt module has an option to update the cache, you should use that instead of having a separate task to update the cache.