From 6d32065246ee80d3a8daa4b298b769227a56f9d7 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Sat, 22 Jun 2024 10:23:53 +0200 Subject: [PATCH] Update conditions for kernel statoverride With update of ansible version having variables in conditions is not allowed anymore, which results in error like: `Conditional is marked as unsafe, and cannot be evaluated` Change-Id: I6e8e0ee1ffc2c154bac0f64f2e797281d7ba966f --- tasks/drivers/kvm/nova_kernel_permissions.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tasks/drivers/kvm/nova_kernel_permissions.yml b/tasks/drivers/kvm/nova_kernel_permissions.yml index 755fa956..cba8cea1 100644 --- a/tasks/drivers/kvm/nova_kernel_permissions.yml +++ b/tasks/drivers/kvm/nova_kernel_permissions.yml @@ -24,13 +24,12 @@ - name: Latest kernel readable to nova group/user command: 'dpkg-statoverride --update --add root nova 0640 {{ latest_kernel }}' register: dpkg_statoverride_result - changed_when: > - 'an override for \'{{ latest_kernel }}\' already exists; aborting' - not in dpkg_statoverride_result.stderr - failed_when: > - (dpkg_statoverride_result.rc != 0) and - ('an override for \'{{ latest_kernel }}\' already exists; aborting' - not in dpkg_statoverride_result.stderr) + changed_when: + - ("an override for '" ~ latest_kernel ~ "' already exists; aborting" not in dpkg_statoverride_result.stderr) + failed_when: + - (dpkg_statoverride_result.rc != 0) and + ("an override for '" ~ latest_kernel ~ "' already exists; aborting" + not in dpkg_statoverride_result.stderr) - name: Script installed to make future kernels readable to nova group/user copy: