Sign inSign up

identeco/ansible-lint

By identeco

•Updated about 13 hours ago

tiny alpine based docker image for ansible-lint

Image
0

10K+

identeco/ansible-lint repository overview

⁠Docker image for ansible-lint

ansible-lint checks playbooks for practices and behavior that could potentially be improved.

We provide tiny docker images with ansible-lint versions that are supported out-of-the box by Alpine Linux. Therefore, you can choose from these tags for respective versions (currently):

  • latest (based upon Alpine Linux’ edge version (currently ansible-lint 6.9 but may change anytime))
  • 6.8 (Alpine Linux 3.17)
  • 6.2 (Alpine Linux 3.16)
  • 4.3 (Alpine Linux 3.15)

⁠Usage

You can use these images in the following ways.

⁠CLI
# Single playbook
docker run --rm -v $(pwd):/data identeco/ansible-lint playbook.yml

# All playbooks via wildcard
docker run --rm -v $(pwd):/data identeco/ansible-lint *.yml

# Single role (run from within the role's root)
docker run --rm -v "$(pwd)":"/data/$(basename "$(pwd)" )" -e ANSIBLE_ROLES_PATH="/data" identeco/ansible-lint "/data/$(basename "$(pwd)" )/tests/test.yml"
⁠Gitlab CI/CD

Example from .gitlab-ci.yml:

lint:
  stage: linting
  image: identeco/ansible-lint:6.2
  script:
    - ansible-lint --exclude roles --exclude collections -x "yaml[line-length]"
    - ansible-lint roles/custom_role

Created, published and maintained by Identeco⁠. Contact us via: tech (hyphen) docker (at) identeco.de.

Tag summary

Content type

Image

Digest

sha256:02607401d…

Size

115.1 MB

Last updated

about 13 hours ago

docker pull identeco/ansible-lint