fimfarchive/operations/common/tasks/apt.yml

37 lines
728 B
YAML
Raw Permalink 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
2018-06-01 20:57:02 +02:00
when: result is changed
2017-05-27 21:44:37 +02:00
- 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
2018-06-01 20:57:02 +02:00
when: result is changed