3 ms·
How do you test your playbooks targeting bare metals during development? So far I’m using docker but the official base image is very different from the official
by ggregoire 7y ago
How do you test your playbooks targeting bare metals during development? So far I’m using docker but the official base image is very different from the official ISO, that’s kinda annoying (no ssh, no python, not even ps). I’m thinking about using Vagrant. I also saw a framework called Molecule but it’s based on docker so I guess it’ll be the same problem.
- williamdclt 7y agoDefinitely Vagrant, easy to setup and close enough to the actual server (same ISO after all)
- jlgaddis 7y agoI just (in the last two weeks or so) started using Molecule. It took a bit to get everything set up and figured out but now that I've got things the way I want them it really is pretty awesome. I'm using it with Vagrant and VirtualBox at the moment, just because that was the easiest way -- if you aren't already using Docker, that is -- to get started (due to available documentation, examples, etc.) but eventually I'd like to use both Docker and my ESXi lab for testing. Testing w/ bare-metal was always a pain in the ass as I'd constantly need to "reset" the hosts to a specific "known good" starting point. I have everything set up for automated network installs, though, so it only takes 5 minutes or so to wipe and reinstall a physical host. Now, I'm doing all my Ansible testing against VMs on VirtualBox, running from an image generated by Packer. Those images use the exact same preseed.cfg file I use on the bare-metal host, making it sooooo much easier. I do all my testing on the VMs, make sure everything is correct, and then run it against the physical host once for "verification".
- ggregoire 7y agoThanks, you confirmed what I was thinking. That’s exactly the setup and workflow I’d like to have. :)
- jlgaddis 7y agoFeel free to reach out (my username at Gmail) if (when) you run into issues or have any questions. I'm still learning new things as I go but I'm glad I decided to go down this path (and I'm happy to help if I can). It really is worth the time and effort!