My experience in automating package management on Linux
I installed Linux Lite recently on a laptop. I have been meaning to automated the installation and updating of dependencies, so I took the chance to use Ansible to do most of the APT installation and adding of Deb dependencies.
I found that while Ansible was easy enough to figure out generally, it adds friction to the process, especially since it abstract over things so you don't actually know what it is doing.
So then I went with a simpler route. Bash scripts which can run repeatedly to configure, install and update packages on Linux.
Specifically, I'd recommend looking at the install.sh script.
I hope my repos will be useful for others.
If anyone has found or created something similar to share, please comment here.