Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't update_cache when running APT install task #35

Open
rwanyoike opened this issue Aug 13, 2015 · 3 comments
Open

Don't update_cache when running APT install task #35

rwanyoike opened this issue Aug 13, 2015 · 3 comments

Comments

@rwanyoike
Copy link

This is the only ANXS playbook I've noted that runs update_cache while installing packages. I think it's better to depend on https://github.com/ANXS/apt (or not), which is able to check how recent the cache was updated, and save time. I noticed this because the speed difference had an impact on a slow connection.

- name: MySQL | Make sure the MySQL packages are installed
  apt:
    pkg: "{{item}}"
    update_cache: yes
  with_items: mysql_packages
@patrickheeney
Copy link

+1
This is the only role that has this on my end as well. It is generally done in a common role or in your playbook. The mysql role should only install, not update cache.

@mikegleasonjr
Copy link

Better yet, using something like cache_valid_time: 86400 would update it only if it is one day old...

If only every role did that... we wouldn't need a common role to do it.

@soupdiver
Copy link
Contributor

Sounds valid to me.
I checked some other repos and usually we don't add cache_valid_time

Feel free top open a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants