Also updates tests for the custom ansible-lint rules.
Adds a simple testsuite so test roles and playbooks that are known to be
faulty or valid can be put in a directory structure like:
<rule id>/valid/playbooks/valid_playbook.yaml
<rule id>/valid/roles/valid_role/tasks/main.yaml
<rule id>/valid/roles/valid_role/handlers/main.yaml
<rule id>/faulty/playbooks/faulty_playbook.yaml
<rule id>/faulty/roles/faulty_role/tasks/main.yaml
<rule id>/faulty/roles/faulty_role/handlers/main.yaml
So they will verify that the rules work as expected.
Change-Id: I29d0766c67e690e35490586f6befb95e4cd31b98
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