From 7edded449c502bd66e80320ae02c396cb34ccbf4 Mon Sep 17 00:00:00 2001 From: David Galloway Date: Thu, 4 Feb 2021 12:28:51 -0500 Subject: [PATCH] common: Disable sleeping on Ubuntu 20.04 and later Fixes: https://tracker.ceph.com/issues/49152 Signed-off-by: David Galloway --- roles/common/tasks/apt_systems.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/roles/common/tasks/apt_systems.yml b/roles/common/tasks/apt_systems.yml index e5fe259a..6f34fcc7 100644 --- a/roles/common/tasks/apt_systems.yml +++ b/roles/common/tasks/apt_systems.yml @@ -24,3 +24,15 @@ when: etc_timezone is changed tags: - timezone + +- name: Mask sleep units + systemd: + name: "{{ item }}" + state: stopped + masked: yes + with_items: + - sleep.target + - suspend.target + - hibernate.target + - hybrid-sleep.target + when: ansible_distribution_major_version|int >= 20 -- 2.47.3