ansible-test
Tests a playbook using a docker container:
ansible-test playbook.yml # defaults to centos7 image=ubuntu1804 ansible-test playbook.yml
The playbook will be tested for idempotency by running it a 2nd time and ensuring nothing is marked as changed, disable it with:
idempotency=false ansible-test playbook.yml
Once the playbook is run any InSpec (.rb) or bats (.bats) tests found with the same name (e.g. playbook.rb
) will be executed.
See it in action here