From 7d9380c2c9dd87876ce4d9f9b30c934505fcba51 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Sun, 9 Dec 2018 18:28:59 +0100 Subject: Disable resume device. We don't need suspend-on-disk (hibernation). --- roles/common/files/etc/initramfs-tools/conf.d/resume | 1 + roles/common/handlers/main.yml | 3 +++ roles/common/tasks/main.yml | 12 ++++++++++++ 3 files changed, 16 insertions(+) create mode 100644 roles/common/files/etc/initramfs-tools/conf.d/resume diff --git a/roles/common/files/etc/initramfs-tools/conf.d/resume b/roles/common/files/etc/initramfs-tools/conf.d/resume new file mode 100644 index 0000000..213a0e2 --- /dev/null +++ b/roles/common/files/etc/initramfs-tools/conf.d/resume @@ -0,0 +1 @@ +RESUME=none diff --git a/roles/common/handlers/main.yml b/roles/common/handlers/main.yml index dc6c457..394c67a 100644 --- a/roles/common/handlers/main.yml +++ b/roles/common/handlers/main.yml @@ -52,3 +52,6 @@ - name: Restart freshclam service: name=clamav-freshclam state=restarted + +- name: Update initramfs + command: /usr/sbin/update-initramfs -u diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index 49ff1ad..7fa7b20 100644 --- a/roles/common/tasks/main.yml +++ b/roles/common/tasks/main.yml @@ -82,3 +82,15 @@ - rsync - screen - telnet-ssl + +- name: Disable resume device + # Cf. initramfs-tools(7) and initramfs.conf(5). + copy: src=etc/initramfs-tools/conf.d/resume + dest=/etc/initramfs-tools/conf.d/resume + owner=root group=root + mode=0644 + tags: + - initramfs + - resume + notify: + - Update initramfs -- cgit v1.2.3