Quickly install puppet agent on Ubuntu

I often want to add some running computer to my puppet platform. Here is a little script I use to achieve this simple task. Run it as root.