From: Kienan Stewart Date: Thu, 8 Aug 2024 17:51:36 +0000 (-0400) Subject: ansible: Fix core pattern match X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=3b731eb847cd094b5540c80a9bbad64c2834aeba;p=lttng-ci.git ansible: Fix core pattern match The output of /proc/sys/kernel/core_pattern is single-quoted with the default core pattern. Change-Id: I7da0b590afdf247cbac3b0944dfa42d9258bdbcf Signed-off-by: Kienan Stewart --- diff --git a/automation/ansible/roles/lxd/tasks/main.yml b/automation/ansible/roles/lxd/tasks/main.yml index 47e3a6c..d4a5ff4 100644 --- a/automation/ansible/roles/lxd/tasks/main.yml +++ b/automation/ansible/roles/lxd/tasks/main.yml @@ -15,11 +15,10 @@ argv: ['cat', '/proc/sys/kernel/core_pattern'] register: current_core_pattern - name: 'Update current core pattern' - when: current_core_pattern.stdout|trim != lxd_core_pattern + when: current_core_pattern.stdout|trim != "'{{lxd_core_pattern}}'" ansible.builtin.command: argv: ['sysctl', '-w', "kernel.core_pattern='{{lxd_core_pattern}}'"] - - name: Install LXD ansible.builtin.apt: name: lxd