Fix the contents of the Ubuntu agent puppet.conf files; use an actual agent puppet.conf config file instead of the one from the master.
Remove an extra . from the SSL config line in the Puppet master puppet.conf heredocs.
Don't purge other Apache configs.
Install some more Apache modules.