From 983d2339f2f2ac7bfe0dede358a1b2d2c07bbd44 Mon Sep 17 00:00:00 2001 From: Josh Lay Date: Tue, 6 Aug 2024 08:16:10 -0500 Subject: [PATCH] role: stop ppd, handle only when installed --- roles/tuned_amdgpu/tasks/main.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/roles/tuned_amdgpu/tasks/main.yml b/roles/tuned_amdgpu/tasks/main.yml index 3f36969..81f450b 100644 --- a/roles/tuned_amdgpu/tasks/main.yml +++ b/roles/tuned_amdgpu/tasks/main.yml @@ -11,12 +11,14 @@ when: ansible_facts['packages']['tuned'][0]['version'] is version('2.23.0', '<') # versions are in a list...? pick the first; only expect one # around Fedora 35/36, the packages for 'power-profiles-daemon' and 'tuned' conflicted; no more - can coincide -# ensuring the service is masked should suffice for their conflicts -- name: Ensure power-profiles-daemon is disabled/masked +# ensuring the service is masked should suffice - not removed; gnome/others may 'require' it. doing so may remove them implicitly +- name: Ensure power-profiles-daemon is off/disabled/masked ansible.builtin.systemd_service: name: power-profiles-daemon enabled: false masked: true + state: stopped + when: "'power-profiles-daemon' in ansible_facts['packages']" become: true - name: Ensure 'tuned' is installed