Update apt package cache if older than one day
This commit is contained in:
parent
b5b679f42a
commit
0848933f52
|
@ -1,8 +0,0 @@
|
||||||
---
|
|
||||||
- name: upgrade packages
|
|
||||||
apt:
|
|
||||||
upgrade: full
|
|
||||||
update_cache: yes
|
|
||||||
|
|
||||||
- name: clean package cache
|
|
||||||
command: apt-get clean
|
|
|
@ -3,6 +3,8 @@
|
||||||
apt:
|
apt:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
state: present
|
state: present
|
||||||
|
update_cache: yes
|
||||||
|
cache_valid_time: 86400
|
||||||
with_items:
|
with_items:
|
||||||
- aptitude
|
- aptitude
|
||||||
- python-apt
|
- python-apt
|
||||||
|
|
|
@ -13,6 +13,3 @@
|
||||||
template:
|
template:
|
||||||
src: templates/50unattended-upgrades.j2
|
src: templates/50unattended-upgrades.j2
|
||||||
dest: /etc/apt/apt.conf.d/50unattended-upgrades
|
dest: /etc/apt/apt.conf.d/50unattended-upgrades
|
||||||
notify:
|
|
||||||
- upgrade packages
|
|
||||||
- clean package cache
|
|
||||||
|
|
Loading…
Reference in a new issue