ansible: Fix core pattern match
authorKienan Stewart <kstewart@efficios.com>
Thu, 8 Aug 2024 17:51:36 +0000 (13:51 -0400)
committerKienan Stewart <kstewart@efficios.com>
Thu, 8 Aug 2024 18:19:47 +0000 (14:19 -0400)
The output of /proc/sys/kernel/core_pattern is single-quoted with the
default core pattern.

Change-Id: I7da0b590afdf247cbac3b0944dfa42d9258bdbcf
Signed-off-by: Kienan Stewart <kstewart@efficios.com>
automation/ansible/roles/lxd/tasks/main.yml

index 47e3a6c34e72893ab74182685933d9d50bda1250..d4a5ff4fc7a4fba6684030c646dca886c16028d0 100644 (file)
         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
This page took 0.025621 seconds and 4 git commands to generate.