From 4d2c13b59548f2c235ca4180c21bbe07e2df47dc Mon Sep 17 00:00:00 2001 From: Sergii Golovatiuk Date: Fri, 5 Dec 2025 13:10:13 +0100 Subject: [PATCH] [config_drive] Fix conditional to handle NoneType properly Replace explicit 'is not none' check with default filter for None safety. Ansible 2.16+ requires conditionals to return boolean values, not NoneType. Co-Authored-By: Claude Signed-off-by: Sergii Golovatiuk --- roles/config_drive/tasks/main.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/roles/config_drive/tasks/main.yml b/roles/config_drive/tasks/main.yml index e41c89ba16..d65fa159ce 100644 --- a/roles/config_drive/tasks/main.yml +++ b/roles/config_drive/tasks/main.yml @@ -61,9 +61,7 @@ - name: Generate network-data register: _net_data_change - when: - - cifmw_config_drive_networkconfig is not none - - cifmw_config_drive_networkconfig | length > 0 + when: cifmw_config_drive_networkconfig | default({}) | length > 0 ansible.builtin.template: backup: true src: "network-config.j2"