zuul-jobs/roles/htmlify-logs/tasks/main.yaml
Albin Vass d0e2016592 Add loop var policy to ansible-lint
This adds a custom ansible-lint rule at .rules/ZuulJobsNamespaceLoopVar.py
that enforces the loop var policy described at:
https://zuul-ci.org/docs/zuul-jobs/policy.html#ansible-loops-in-roles

It also updates existing roles to follow the policy.

Change-Id: I92b2ff56a1c2702542fc07b316f1809087a4c92f
2020-04-29 17:20:59 +02:00

18 lines
406 B
YAML

- name: Find text files to HTMLify
find:
paths: "{{ zuul.executor.log_root }}"
recurse: true
patterns:
- "*.txt"
- "*.txt.gz"
register: htmlify_files
- name: HTMLify text files
htmlify:
input: "{{ zj_item.path }}"
output: "{{ zj_item.path | regex_replace('\\.txt', '.html') }}"
loop: "{{ htmlify_files.files }}"
loop_control:
loop_var: zj_item
no_log: true