Bash scripts -- write scripts, check them into git, make sure they are idempotent and repeatable. Whenever you start something new, reuse them and fix whatever broke since the last time.
For testing the scripts, I've used virtualbox -- install the latest ubuntu server LTS into a VMinstall your ssh keys, dotfiles, etc but leave it otherwise bare-bones. Then, clone it (this takes just a few seconds) and do your testing inside the clone. When you need a clean environment, delete the clone and create a new one... Makes for fast iteration on testing that install scripts always work. Don't configure anything by hand -- learn enough sed/awk/grep/etc to modify what configs you need without invoking an editor.
If you need to scale this up to something real and in production on multiple systems -- then start learning Ansible / Salt / etc. Doing in those systems what you now have documented in bash scripts will be some work, but doable.