d0e2016592
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
32 lines
756 B
YAML
32 lines
756 B
YAML
---
|
|
- name: Install Python dependencies
|
|
become: true
|
|
pip:
|
|
name:
|
|
- yamale==1.8.0
|
|
- yamllint==1.13.0
|
|
|
|
- name: Install chart-testing
|
|
become: true
|
|
unarchive:
|
|
remote_src: true
|
|
src: "https://github.com/helm/chart-testing/releases/download/v{{ chart_testing_version }}/chart-testing_{{ chart_testing_version }}_linux_amd64.tar.gz"
|
|
dest: /usr/local/bin
|
|
|
|
- name: Setup /etc/ct
|
|
become: true
|
|
file:
|
|
path: /etc/ct
|
|
state: directory
|
|
|
|
- name: Install configuration files
|
|
become: true
|
|
get_url:
|
|
url: "https://raw.githubusercontent.com/helm/chart-testing/v{{ chart_testing_version }}/etc/{{ zj_item }}"
|
|
dest: "/etc/ct/{{ zj_item }}"
|
|
loop:
|
|
- chart_schema.yaml
|
|
- lintconf.yaml
|
|
loop_control:
|
|
loop_var: zj_item
|