It should be pretty easy to adapt it for Debian. The only thing you need to change as far as I can see is the usage of the dnf module to the apt module.
Comment on Homeserver Ansible Playbook
idefix@sh.itjust.works 6 months ago
Nice, well done. I wish I could find the same for Debian.
Tywele@lemmy.dbzer0.com 6 months ago
vortexsurfer@lemmy.world 6 months ago
If you want to make your playbooks/roles more universal, there’s a generic package module which will figure out what package manager to use based on the detected OS.
Or, if that doesn’t fit your needs, you can add conditions to tasks (or blocks of tasks), like
when: ansible_os_family == “Debian”
and use that for tasks specific to a given Linux distro/family.
Ansible will detect a lot of info about each host and make it available as facts. See for example docs.ansible.com/…/playbooks_vars_facts.html
Tywele@lemmy.dbzer0.com 6 months ago
I know but I also learned that it’s generally better to use the specific module for the package manager (just can’t remember why from the top of my head) and I never intended this playbook to be generally usable.
BrianTheeBiscuiteer@lemmy.world 6 months ago
DebOps my dude.
idefix@sh.itjust.works 6 months ago
Thanks!
k_rol@lemmy.ca 6 months ago
Thx I had no idea!