From ca310a26e14dd2abb67df42c23f20ecfe2dece7d Mon Sep 17 00:00:00 2001 From: Jason Rothstein Date: Mon, 8 Feb 2021 22:14:56 -0600 Subject: [PATCH] Only run grubby if cat runs (fixes check mode) --- tasks/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tasks/main.yml b/tasks/main.yml index 41b4ef5..b778e6f 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -74,6 +74,7 @@ - name: 'Add cgroups v1 if disabled' when: - results is defined + - results.stdout is defined - ' "systemd.unified_cgroup_hierarchy=0" not in results.stdout ' shell: cmd: | @@ -81,6 +82,7 @@ - name: 'Reboot to enable cgroups v1' when: - results is defined + - results.stdout is defined - ' "systemd.unified_cgroup_hierarchy=0" not in results.stdout ' reboot: - name: 'flush handlers'