feat: use builtin virtualisation detection
This commit is contained in:
parent
6d2695274c
commit
02d15fb57a
6 changed files with 15 additions and 14 deletions
|
|
@ -9,10 +9,10 @@
|
|||
# disable swap
|
||||
@reboot swapoff -a
|
||||
|
||||
{% if type == 'vm' %}
|
||||
{% if ansible_virtualization_type == 'kvm' %}
|
||||
# flush caches every 2 hours
|
||||
0 */2 * * * echo 3 > /proc/sys/vm/drop_caches
|
||||
{% endif %}
|
||||
|
||||
# update packages between 3:15-3:30 am
|
||||
# update packages on sunday between 3:15-3:30 am
|
||||
15 3 * * 0 sleep $(($RANDOM % 900)) && apk -U upgrade >/dev/null 2>&1 && apk clean cache && reboot -d 60
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue