mysql
mysql copied to clipboard
Don't `update_cache` when running APT install task
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
+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.
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.
Sounds valid to me.
I checked some other repos and usually we don't add cache_valid_time
Feel free top open a PR