Corrigible

Because we had a TON of existing ansible workbooks and because we were copying workbook code all over the place without any mechanism for maintaining fixes across the various copies, I reworked the way ansible workbooks happen and added a few conveniences like filename-based snippet ordering and top-down variable substitution and came up with something that makes it much easier to maintain a stable of ansible work.

Corrigible

Because we had a TON of existing ansible workbooks and because we were copying workbook code all over the place without any mechanism for maintaining fixes across the various copies, I reworked the way ansible workbooks happen and added a few conveniences like filename-based snippet ordering and top-down variable substitution and came up with something that makes it much easier to maintain a stable of ansible work.

Design Criteria

Authoring new workbooks using old workbooks as a template is painful. Figuring out where to insert new code can be a bit of a challenge when it's been a while since your head was in the last one. And ansible's variable precedence and inclusion mechanism could use a dose of sanity.

Corrigible attempts to address these pain points.

Implementation

Corrigible is a python script that simply reads from the .system and .yml plan files, uses what it finds to generate a new ansible workbook on the fly, and, optionally, runs the ansible playbook.

Snippets of ansible code live in plan files and these are ordered in in the final workbook output according to the naming convention of the snippet files, like: 081_stop_server.plan.yml vs 802_start_server.plan.yml.

Hilights