4 ms·
Yeah i agree. Although I still haven't found a test framework I like for this so any pointers appreciated! I tried it all ansible based: https://github.com/Cra
by CraigJPerry 11y ago
Yeah i agree. Although I still haven't found a test framework I like for this so any pointers appreciated!
I tried it all ansible based: https://github.com/CraigJPerry/ansible-users/tree/test-cases-as-documentation/tests https://github.com/CraigJPerry/ansible-users/tree/test-cases...
I tried it using Python's unittest2 module: https://github.com/CraigJPerry/home-network/blob/v0.1.5/tests/ https://github.com/CraigJPerry/home-network/blob/v0.1.5/test...
I like the idea that ansible playbooks should be self testing.
- falcolas 11y agoI'm working from a memory of a podcast, so pull out those pinches of salt: Chef offers a testing suite - it basically offers a running mode which does an audit of what current conforms to the recipes you've passed it, and outputs a list of actions it would take to remedy this. Combined with VMs, this lets you do some basic automated testing to ensure that your script is doing what you intend it to do. I could swear that they also some kind of automated validation against an "inventory", which would make it possible to do automated tests against a known, unchanging target, but at this point I'm probably mis-remembering. They may have just advocated using VMs, images, and audits as validation.
- otterley 11y agoHave you tried Serverspec?