Plugins for playbooks

The 'remove cruft' PR should be merged before this one.

I will comment on individual lines in the diff instead of writing everything here.