4 ms·
It's funny but I was just going to setup my new OpenBSD router and obviously I'm using Ansible where I can declaratively define what packages to install, what c
by INTPenis 5y ago
It's funny but I was just going to setup my new OpenBSD router and obviously I'm using Ansible where I can declaratively define what packages to install, what configuration files to setup and so forth.
OP just re-invented that wheel.
- kiwijamo 5y agoThe difference is that Ansible just installs the package you ask for in addition to other packages which may have been installed by a previous play or by other means, whereas the OP has developed a tool that ensures only the specific packages you ask for (and its dependencies) are installed. One gotcha of Ansible is that removing a package from a playbook does not remove it from Ansible managed systems. You need to either manually remove the package or add another play that removes the package. The OP's tool does not have this limitation.
- scrapheap 5y agoYou can create an Ansible play that will make sure that only a fixed set of packages are installed. You can even make it pull that list of packages and their versions from another machine (actually very useful for making sure that your production servers aren't running newer packages than your dev/test environments).
- szszrk 5y agoWell, you just change state to absent and it will be uninstalled. You don't need two tasks for that. It's one task that describes state of a package. That state can be a number of things. You don't even need to create a task for each package, you can easily make a loop over a predefined key:value list with statuses of packages you want/don't want. What I mean is that It's not an impossible goal with Ansible. Not even a tough one.
- oddlama 5y agoNeither impossible nor tough, but also not a clean way of managing state. You need to keep track of all past things you once did but no longer need.
- INTPenis 5y agoI guess the point is that it's already there and ready to be used. Not trying to discourage innovation and enthusiasm. I just want my router setup.
- szszrk 4y agoI don't think this is true. What happened to things "you no longer need", did these packages disappear? Or you suddenly trust system defaults? If you do then why with minimalist approach at all. It feels very inconsistent to me. You can always start from a minimalist system image and then add a few packages you need using Ansible. Is that really that different?