Use apt_repository update_cache parameter #1

Merged
merged 1 commit into from Mar 1, 2015

Projects

None yet

2 participants

@barraponto
Contributor

Makes for a smaller task :)

@geerlingguy
Owner

@barraponto - Since I often run these roles 2, 4, 10 times a day when doing development work (and I generally like having fast playbook runs in general :), I don't like to update apt's cache if it can be avoided... thus I either always have an cache_valid_time of at least 3600 or 86400, or do something like I did in this role where I only update the cache if I know I need to.

At a minimum, I'd like to have cache_valid_time added here.

@barraponto
Contributor

From the apt_repository update_cache docs:

Run the equivalent of apt-get update when a change occurs. Cache updates are run after making changes.

So, I think it will only run if it needs to.

@geerlingguy
Owner

@barraponto - Ah, good eye on that! I never read the docs on apt_repository in that much detail, and was assuming the parameter behaved the same as it does with the general apt module. Learn something new every day!

@geerlingguy geerlingguy merged commit f9b5927 into geerlingguy:master Mar 1, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment