summaryrefslogtreecommitdiffstats
path: root/roles/common
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2018-12-09 18:28:59 +0100
committerGuilhem Moulin <guilhem@fripost.org>2018-12-09 20:25:40 +0100
commit7d9380c2c9dd87876ce4d9f9b30c934505fcba51 (patch)
tree693197a43ea3ddee909e4ba8ccb9e6cb53f057ad /roles/common
parent1b834eaf9983dc94cbdbee983c5f15e4f50b4d7c (diff)
Disable resume device.
We don't need suspend-on-disk (hibernation).
Diffstat (limited to 'roles/common')
-rw-r--r--roles/common/files/etc/initramfs-tools/conf.d/resume1
-rw-r--r--roles/common/handlers/main.yml3
-rw-r--r--roles/common/tasks/main.yml12
3 files changed, 16 insertions, 0 deletions
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