diff mbox series

Squash me

Message ID 20241009192608.1081846-1-cel@kernel.org (mailing list archive)
State New
Headers show
Series Squash me | expand

Commit Message

Chuck Lever Oct. 9, 2024, 7:26 p.m. UTC
From: Chuck Lever <chuck.lever@oracle.com>

A few more logic changes to get config-kdevops working again. To be
squashed into:

https://lore.kernel.org/kdevops/ABA3A866-8648-46D0-B0FF-CAAD6E42E40A@oracle.com/T/#t

Comments, corrections, questions, testing results welcome.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 playbooks/roles/bootlinux/tasks/main.yml | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/playbooks/roles/bootlinux/tasks/main.yml b/playbooks/roles/bootlinux/tasks/main.yml
index aab672cd9073..7c3c0d6279a9 100644
--- a/playbooks/roles/bootlinux/tasks/main.yml
+++ b/playbooks/roles/bootlinux/tasks/main.yml
@@ -245,6 +245,7 @@ 
     path: "{{ role_path }}/templates/{{ target_linux_config }}"
   register: kernel_config
   delegate_to: localhost
+  when: not config_kdevops.stat.exists
 
 - name: Find all linux-next configs
   find:
@@ -254,13 +255,16 @@ 
     recurse: no
   register: found_configs
   delegate_to: localhost
-  when: not kernel_config.stat.exists
+  when:
+    - not config_kdevops.stat.exists
+    - not kernel_config.stat.exists
 
 - name: Extract the date from the filenames
   set_fact:
     configs_with_dates: "{{ configs_with_dates | default([]) + [{'file': item.path, 'date': (item.path | regex_search('config-next-(\\d{8})')).split('-')[-1]}] }}"
   loop: "{{ found_configs.files }}"
   when:
+    - not config_kdevops.stat.exists
     - not kernel_config.stat.exists
     - item.path is search('config-next-(\\d{8})')
   no_log: true
@@ -270,6 +274,7 @@ 
   set_fact:
     sorted_configs: "{{ configs_with_dates | selectattr('date', 'defined') | sort(attribute='date', reverse=True) | map(attribute='file') | list }}"
   when:
+    - not config_kdevops.stat.exists
     - not kernel_config.stat.exists
     - configs_with_dates | length > 0
   delegate_to: localhost
@@ -278,6 +283,7 @@ 
   set_fact:
     latest_linux_next_config: "{{ sorted_configs[0] }}"
   when:
+    - not config_kdevops.stat.exists
     - not kernel_config.stat.exists
     - sorted_configs | length > 0
   delegate_to: localhost
@@ -286,7 +292,7 @@ 
   set_fact:
     linux_config: "{{ target_linux_config | default('') if kernel_config.stat.exists else (latest_linux_next_config | default('') | basename) }}"
   when:
-    - not kernel_config.stat.exists
+    - not config_kdevops.stat.exists
     - latest_linux_next_config is defined
   delegate_to: localhost