Use the prescribed roles
Jobs can be assembled from roles that are already prepared.
Two lines of roles you can use
- The standard roles Zuul provides (zuul-jobs)
- Roles gathered as parts in a library (a collection)
How you assemble a job
- A job calls roles by name and combines them. You do not write the procedure inside the job
- A role’s version and checksum pins are fixed in the role itself, so you do not manage them
When no part fits
- Only then, a new role can be added to the library
- The rules for adding one: write the procedure with Ansible’s standard modules, not scripts; put the pins in the role’s defaults; the bar is idempotence (run it twice; the second run changes nothing)
- The first example is
complexity_tools(preparing the complexity-measurement toolset, in operation), replacing the old install script