Absolutely you can. I use Openvz for this, under Redhat, however you should be able to do it under ubuntu as well. Using ansible and the openvz module you can create VM's easily with one command:
...