fimfarchive/operations/common/tasks/apt.yml

37 lines
726 B
YAML
Raw Normal View History

2017-05-27 21:44:37 +02:00
---
#
# Installs upgrades and configures package manager.
#
- name: Upgrade packages
apt:
update_cache: yes
upgrade: dist
register: result
- name: Update GRUB
command: update-grub
environment:
UCF_FORCE_CONFFNEW: YES
when: result | changed
- name: Install Debian utilities
apt:
name: "{{ item }}"
state: present
with_items:
- debconf-utils
- unattended-upgrades
- name: Enable unattended upgrades
debconf:
name: unattended-upgrades
question: unattended-upgrades/enable_auto_updates
vtype: boolean
value: "true"
register: result
- name: Reconfigure unattended upgrades
command: dpkg-reconfigure -f noninteractive unattended-upgrades
when: result | changed