Squash me
PATCH 1/1 Squash me
From: Chuck Lever <[email protected]>
A few more logic changes to get config-kdevops working again. To be squashed into:
https://lore.kernel.org/kdevops/[email protected]/T/#t
Comments, corrections, questions, testing results welcome.
Signed-off-by Chuck Lever <[email protected]>
--- playbooks/roles/bootlinux/tasks/main.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
playbooks/roles/bootlinux/tasks/main.yml +8 -2
@@ -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
Signature · 1 line
2.46.1