I have a few VMs and PMs around the house that I’d setup over time and I’d now like to rebuild some, not to mention just simplify the whole lot.
How the hell do I get from a working system to an equivalent ansible playbook without many (MANY) iterations of trial & error - and potentially destroying the running system??
Ducking around didn’t really show much so I’m either missing a concept / keyword, or, no-one does this.
Pointers?
TIA
You will need many iterations of trial and error. No way.
You can speed up testing your playbook by using Molecule or something similar. Don’t touch your working VMs until you get a service (role) set up correctly in your test environment. If you need to set up multiple services in a single VM, you can automate their deployment sequentially, of course.
P. S. I don’t like Ansible and won’t recommend it because it is full of bugs and non-obvious behavior. However I didn’t investigate alternatives and can’t suggest a better one.
Could you elaborate a little bit about “full of bugs” and “non-obvious behaviour”? I use Ansible at work for a couple of years already and never encountered anything like that. (I have about 10 playbooks, about 30 roles, about 20 linux servers that I administer)
Same question. But with 100s of playbooks, and thousands of servers. This feels like someone had a bad experience with their first 30 minutes of ansible and gave up before looking at the command reference.
No, not 30 minutes. For the first time I spent couple of weeks just for reading documentation and experiments. It was about 8 years ago IIRC. But since that time when I need something more complex than install a package or copy a file, I feel myself like a 30-minutes user because it does not work as I expect.
Fair enough. I honestly didn’t mean this as an insult. I have seen the same type of review from people who join teams that I’m on when they get told about ansible.
It certainly isn’t perfect. And there was a period of time about 5 years ago where a lot of change was happening at once.
Thanks for sharing your opinion
No, I can’t. I use it only occasionally, so I don’t remember everything. But many times configurations didn’t work as described in documentation and I had to find a different way to achieve a required result. Sometimes this behavior changed from release to release. This thing doesn’t seem something that I can rely on. But we use it in our company many years, so switch to another tool would be painful.