'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?
Solution 1:[1]
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.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | De117 |
