Update apt package cache if older than one day

This commit is contained in:
Alexander Dietrich 2017-02-22 18:45:20 +01:00
parent b5b679f42a
commit 0848933f52
3 changed files with 2 additions and 11 deletions

View file

@ -1,8 +0,0 @@
---
- name: upgrade packages
apt:
upgrade: full
update_cache: yes
- name: clean package cache
command: apt-get clean

View file

@ -3,6 +3,8 @@
apt:
name: "{{ item }}"
state: present
update_cache: yes
cache_valid_time: 86400
with_items:
- aptitude
- python-apt

View file

@ -13,6 +13,3 @@
template:
src: templates/50unattended-upgrades.j2
dest: /etc/apt/apt.conf.d/50unattended-upgrades
notify:
- upgrade packages
- clean package cache