From charlesreid1

Revision as of 06:28, 8 December 2018 by Admin (talk | contribs)

there is now a convenient cache_valid_time parameter for the apt module:

Example: Only run "update_cache=yes" if the last one is more than more than 3600 seconds ago

task:
 - name: update apt cache 
    apt: update_cache=yes cache_valid_time=3600

From: http://www.ansibleworks.com/docs/modules.html


Flags