{{cookiecutter.short_description}}
ansible-galaxy install {{ cookiecutter.role_name }}
- hosts: all
roles:
- {{ cookiecutter.role_name }}
See defaults/main.yml
.
- Bundler 1.13.0+
- Ruby 2.3.0+
- Docker 1.12.0+
- See
Gemfile
- See
requirements.txt
- Install the necessary tools:
test/scripts/before-install.sh
- Install required gems from inside the root of the project:
test/scripts/install.sh
- Run lint checks and tests:
test/scripts/test-role.sh
Note that after installing the required gems you can run other Test-kitchen commands besides the ones listed in test/scripts/test-role.sh
.
There are two ways to run builds in parallel:
- Use the Travis-CI Build Matrix feature: uncomment the relevant environment variable in
test/scripts/test-role.sh
and whenever you add a new suite or platform, add all the relevant test instances to.travis.yml
, in theenv
section. This has the advantage that for each instance you will have a separate build job, all part of the same build. Disadvantages are that you have to keep theenv
section updated every time you add a suite or a platform and that this solution is a Travis-CI-only feature. If you use another CI system in the future, you have to figure out how to configure that system to have parallel builds. - Use the Test-Kitchen parallel build feature: builds are parallelized directly by Test-Kitchen: uncomment the relevant command switch in
test/scripts/test-role.sh
. You don't have to manage theenv
section in.travis.yml
like the solution above but thestdout
andstderr
of each build will come unordered in the Travis-CI build output view, so it may be more difficult to check what went wrong. Also this solution is more portable compared to the previous one because it does not depend on the CI system, but only on Test-Kitchen.
Note that parallelization is disabled by default.