Generating an SSL certificate isn't really something that should be automated in the provision script IMO.

Besides, self-signed certificates don't provide any considerable security over plaintext HTTP so I don't see a lot of value in this unless it's signed by a recognised CA.