Linting Ansible Projects
To lint your ansible project locally, the following command can be used:
To lint your ansible project automatically in a ci-cd pipeline, add the following to the include section of your
include: # Ansible - project: 'ska-telescope/templates-repository' file: 'gitlab-ci/includes/ansible.gitlab-ci.yml'
Then, make sure to define the
lint stage in your
.gitlab-ci.yml file as well:
stages: - lint
This will automatically include and run the ansible linting template on your pipeline.