From: David Galloway Date: Thu, 4 Feb 2021 17:28:51 +0000 (-0500) Subject: common: Disable sleeping on Ubuntu 20.04 and later X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F606%2Fhead;p=ceph-cm-ansible.git common: Disable sleeping on Ubuntu 20.04 and later Fixes: https://tracker.ceph.com/issues/49152 Signed-off-by: David Galloway --- 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