Add a custom script to be included `docker-machine create` or `provision`

Is it possible to add my own script that would be run on docker-machine create or docker-machine provision?

Let’s say I want to add fail2ban on for DigitalOcean’s droplet that’s provisioned with docker-machine.

Is it possible to do insert my code automatically, or only manually in a regular ssh after machine is up?

The ‘create’ and ‘provision’ commands do not have any provision to run custom scripts.