• nickwitha_k (he/him)@lemmy.sdf.org
    link
    fedilink
    arrow-up
    2
    ·
    2 days ago

    I’d say, from my experience with Ansible, that it can absolutely do all of that. Might be able to use a single task for the package install, if the distro supports the generic package module. There’s also a pamd module that would likely cover your needs there. If not, it would still be possible with a custom module or some Xinfile fuckery (if it can be fine programmatically, it can be done in Ansible, more niche things may require writing code, however).

    It would not be as terse though. Really wish there was a good middle ground.

    • iopq@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      2 days ago

      It can do that, but it gets more complicated because you are doing this is in an imperative way. For example, in Nix it’s trivial to change the config and remove something.

      In ansible there’s no guarantee installing a package and removing it won’t have side effects. You could install a DE and decide to switch back, but it already changed some files on your system