Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which tools use the "tests" directory in an Ansible role by default?

The ansible-galaxy tool can create a skeleton of an Ansible role. (ansible-galaxy role init myrolename) Inside is a tests directory, but the Ansible documentation does not mention what it's for. Presumably tests of some sort, but who runs them, and how?

like image 394
De117 Avatar asked Oct 19 '25 07:10

De117


1 Answers

Travis CI.

The tests directory seems to have been added in 2015, in PR #13489, and its description makes it clear that it's for Travis. It also adds .travis.yml, which looks like it does nothing by default. Snippet:

script:
  # Basic role syntax check
  - ansible-playbook tests/test.yml -i tests/inventory --syntax-check

I am not aware of any other tools using it.

like image 170
De117 Avatar answered Oct 22 '25 03:10

De117



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!