People are asking for scripts to set up a VPN! This is even better, it is an Ansible playbook which sets up a L2TP/IPSEC VPN! The only thing you need to edit is the Shared Secret...
It sets up the VPN as described here: https://raymii.org/s/tutorials/IPSEC_L2TP_vpn_with_Ubuntu_12.04.html
It sets up local user authentication via PAM, so no passwords in text files. Tested and supported on Ubuntu 10.04+.
Then, clone the repo and run the playbook:
https://github.com/RaymiiOrg/ansible/tree/master/vpn
ansible-playbook -s vpn.yml
(Don't forget to change the host and user)
You're all welcome.