public inbox for kdevops@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH] Squash me
@ 2024-10-09 19:26 cel
  0 siblings, 0 replies; only message in thread
From: cel @ 2024-10-09 19:26 UTC (permalink / raw)
  To: kdevops; +Cc: Chuck Lever

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 --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
 
-- 
2.46.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-10-09 19:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-09 19:26 [PATCH] Squash me cel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox