From a4642e6e52928ceb2e137a2fe0398ea1c5d4774e Mon Sep 17 00:00:00 2001 From: bri <284789+b-@users.noreply.github.com> Date: Tue, 24 Oct 2023 19:51:15 -0400 Subject: [PATCH] fix: #990 don't disable apparmor unless it's installed (#991) --- bootstrap/templates/ansible/playbooks/cluster-prepare.yaml.j2 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bootstrap/templates/ansible/playbooks/cluster-prepare.yaml.j2 b/bootstrap/templates/ansible/playbooks/cluster-prepare.yaml.j2 index 77e2c15d..440439f4 100644 --- a/bootstrap/templates/ansible/playbooks/cluster-prepare.yaml.j2 +++ b/bootstrap/templates/ansible/playbooks/cluster-prepare.yaml.j2 @@ -8,6 +8,8 @@ - name: Pausing for 5 seconds... ansible.builtin.pause: seconds: 5 + - name: Populate service facts + service_facts: tasks: - name: Locale block: @@ -80,6 +82,7 @@ mode: "0755" content: neofetch --config none - name: System Configuration | Disable apparmor + when: ansible_facts.services['apparmor.service'] is defined ansible.builtin.systemd: name: apparmor state: stopped