5 ms·
How do others test their playbooks? I've been wrapping up playbooks in python unittests[1] but i'd like to find something a bit more expressive and less wordy.
by CraigJPerry 13y ago
How do others test their playbooks?
I've been wrapping up playbooks in python unittests[1] but i'd like to find something a bit more expressive and less wordy. I could shoogle my wee testing framework a bit more into shape but keen to see how others tackle.
Maybe i can steal some inspiration!
[1] https://github.com/CraigJPerry/home-network/blob/master/tests/test_install_pull_mode.py https://github.com/CraigJPerry/home-network/blob/master/test...
- mpdehaan2 13y agoYeah that's a little heavy. A lot of folks such as UC-Davis will embed tests in their playbooks. This way the playbook will fail if something isn't ok, easy to do with a rolling update, etc. Just something like the 'uri' module can be a good way to check for a web service, or 'wait_for' can see if a port is up.
- retr0h 13y agoWe opted to do it with ansible. https://github.com/blueboxgroup/ursula/tree/master/playbooks/tests/tasks https://github.com/blueboxgroup/ursula/tree/master/playbooks...
- CraigJPerry 13y agoYup I like that.