97cd173177
Starting with ansible-core 2.13, list concatenation format is changed and does not support concatenation operations outside of the jinja template. The format change: "[1] + {{ [2] }}" -> "{{ [1] + [2] }}" This affects the horizon role that iterates over existing policy files to override and concatenate them into a single variable. Co-Authored-By: Dr. Jens Harbott <harbott@osism.tech> Closes-Bug: #2045660 Change-Id: I91a2101ff26cb8568f4615b4cdca52dcf09e6978
26 lines
684 B
YAML
26 lines
684 B
YAML
---
|
|
|
|
- name: Update policy file name
|
|
set_fact:
|
|
supported_policy_files: "{{ supported_policy_format_list | map('regex_replace', '(.+)', project_name + '_\\1') | list }}"
|
|
|
|
- name: Check if policies shall be overwritten
|
|
stat:
|
|
path: "{{ fullpath }}"
|
|
delegate_to: localhost
|
|
run_once: True
|
|
register: overwritten_files
|
|
with_first_found:
|
|
- files: "{{ supported_policy_files }}"
|
|
paths:
|
|
- "{{ node_custom_config }}/horizon/"
|
|
skip: true
|
|
loop_control:
|
|
loop_var: fullpath
|
|
|
|
- name: Update custom policy file name
|
|
set_fact:
|
|
custom_policy: "{{ custom_policy + [overwritten_files.results.0.stat.path] }}"
|
|
when:
|
|
- overwritten_files.results
|