Instead of using Ansible or some other configuration management tool, after many months of being the admin of this ubuntu 16.04 server, I made a lot of changes to the system: changed config files in /etc, installed packages, enabled and disabled apache2 modules, and so on.
Is there an automated way to create a script or something, that when executed on a clean installation of ubuntu 16.04 (but if it works on any linux even better), can recreate a server that is more or less exactly the same as the one I have right now and is working and running?
Edit: Unfortunately this is not a VM I can just clone.