ANXS / mysql

Ansible role for MySQL
MIT License
94 stars 70 forks source link

Don't `update_cache` when running APT install task #35

Open rwanyoike opened 9 years ago

rwanyoike commented 9 years ago

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 commented 9 years ago

+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 commented 9 years ago

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 commented 9 years ago

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

Feel free top open a PR