3 ms·
> Except you'll find that if you have more than one person looking after the machine, someone will install a package directly and it'll get removed by the next
by rkangel 4y ago
> Except you'll find that if you have more than one person looking after the machine, someone will install a package directly and it'll get removed by the next person to run the script.
This is explicitly the purpose of what is being done here. The state of the machine (or at least "which packages are installed") is described completely by the list.
Here is a common problem that you get with Ansible:
I go and build a new machine using an Ansible Playbook that has worked perfectly for 6 months. The production code doesn't run. It turns out that's because there is a package missing that is needed. That package was manually installed on the other server by someone to do a debug task, and then somewhere along the line an implicit dependency on it happened.
With this approach that isn't possible - you've specified the entire (package) state of the system so it isn't possible for the config of the machine to drift from your code that specifies it.
No need to worry your playbook is wrong, no need to do a nightly test of your playbook on a fresh VM.
- scrapheap 4y agoYour Ansible problem is hit when you're setting up a new machine and your live production code is still running on your old production machine. You fix your Ansible script to include the missing dependency, run it against the new server again and it's now working. The risk I described, where a package is removed from your current running production machine and stops your code from working, results in an outage. Personally, I'd rather have the Ansible problem than the outage :)
- anthk 4y agoOpenBSD is not Linux. You can purge all the packages and everything will be fine.