Skip to content
This repository has been archived by the owner on Jun 25, 2023. It is now read-only.

Commit

Permalink
Install update-notifier-common if necessary
Browse files Browse the repository at this point in the history
Fixes #6
  • Loading branch information
jmgq authored and jnv committed May 4, 2015
1 parent c56b1f0 commit 85d88fd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
apt: pkg=unattended-upgrades state=present
tags: unattended

- name: install reboot dependencies
include: reboot.yml
when: unattended_automatic_reboot
tags: unattended

- name: create APT auto-upgrades configuration
copy: >
src=auto-upgrades dest=/etc/apt/apt.conf.d/20auto-upgrades
Expand Down
12 changes: 12 additions & 0 deletions tasks/reboot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
- name: install update-notifier-common
apt: pkg=update-notifier-common state=present
register: install_reboot_dependency
ignore_errors: true
tags: unattended

- name: abort if automatic reboot is unavailable
fail: msg="The unattended_automatic_reboot option was selected but the system has no means to reboot automatically"
when: install_reboot_dependency | failed
tags: unattended

0 comments on commit 85d88fd

Please sign in to comment.