Ansible/Apt: Difference between revisions
From charlesreid1
(Created page with "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 - apt:...") |
No edit summary |
||
| Line 4: | Line 4: | ||
Only run "update_cache=yes" if the last one is more than more than 3600 seconds ago | Only run "update_cache=yes" if the last one is more than more than 3600 seconds ago | ||
- apt: update_cache=yes cache_valid_time=3600 | <pre> | ||
task: | |||
- name: update apt cache | |||
apt: update_cache=yes cache_valid_time=3600 | |||
</pre> | |||
From: | From: | ||
Revision as of 06:28, 8 December 2018
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