Ansible Plone: I need to be able to customize addPloneSite.py.j2 more

What's the best approach if I want to use a really customized version of addPloneSite.py?

Currently it looks like I have three options

  1. Contribute additional options to the template
  2. Add customizations to setuphandlers on a custom policy type package
  3. override addPloneSite.py in my playbook (don't know how to do that yet)

For my usecase I need to be able to do at least the following:

  • Manage navigation settings (e.g. set it to only use folder types for navigation, or specify what types are allowed)
  • Set the theme
  • Customize image settings (I want to change the dimensions for thumbnail, preview etc..)

The settings currently exposed by addPloneSite.py.j2 are useful but I don't think I can achieve the customizations I want yet. For reference here's the original file.

And here's an example of a script (with some of the capabilities I mentioned).
I borrow heavily from the ansible plone.plone_server role addPloneSite.py.j2 script: