jfxs/ansible

By jfxs

Updated 7 days ago

A lightweight automatically updated and tested multiarch docker image to run Ansible playbooks

Image
Integration & delivery
0

50K+

jfxs/ansible repository overview

Docker alpine Ansible

Software License Pipeline Status

A Docker image to run Ansible playbooks. Ansible-lint to test playbooks is also included.

  • lightweight image based on Alpine Linux 150 MB,
  • multiarch with support of amd64 and arm64,
  • non-root container user,
  • automatically updated by comparing software bill of materials (SBOM) changes,
  • image signed with Cosign,
  • a software bill of materials (SBOM) attestation added using Syft,
  • available on Docker Hub and Quay.io.

GitLab The main repository.

Docker Hub The Docker Hub registry.

Quay.io The Quay.io registry.

Since Ansible version 2.10, the Docker image has only ansible-base without any collection. It could be necessary to install them. This image includes:

Running Ansible

Example to run Ansible playbooks in your current directory:

docker run -it --rm -v $(pwd):/ansible jfxs/ansible ansible-playbook playbook.yml

To install collections:

docker run -it --rm -v $(pwd):/ansible jfxs/ansible /bin/sh -c "ansible-galaxy collection install ansible.utils && ansible-playbook playbook.yml"

To test playbooks in your current directory with ansible-lint:

docker run -it --rm -v $(pwd):/ansible jfxs/ansible ansible-lint playbook.yml

Built with

Docker latest tag is 2.21.2-001, 2.21, 2 and has:

NameVersionType
ansible-core2.21.2python
ansible-lint26.6.0python
ca-certificates20260611-r0apk
curl8.21.0-r0apk
go-task3.51.1-r0apk
hvac2.4.0python
jc1.25.7python
jmespath1.1.0python
jq1.8.1-r0apk
netaddr1.3.0python
openssh-client-common10.3_p1-r0apk
openssl3.5.7-r0apk
py3-pip26.1.2-r0apk
pytest-testinfra10.2.2python
python33.14.5-r0apk
sshpass1.10-r0apk
yamllint1.38.0python

Dockerhub Overview page has the details of the last published image.

Versioning

Docker tag definition:

  • the Ansible version used,
  • a dash
  • an increment to differentiate build with the same version starting at 001
<ansible_version>-<increment>

Example: 2.14.2-001

Signature and attestation

Cosign public key:

-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEa3yV6+yd/l4zh/tfT6Tx+zn0dhy3
BhFqSad1norLeKSCN2MILv4fZ9GA6ODOlJOw+7vzUvzZVr9IXnxEdjoWJw==
-----END PUBLIC KEY-----

The public key is also available online: https://gitlab.com/op_so/docker/cosign-public-key/-/raw/main/cosign.pub.

To verify an image:

cosign verify --key cosign.pub $IMAGE_URI

To verify and get the SBOM attestation:

cosign verify-attestation --key cosign.pub --type spdxjson $IMAGE_URI | jq '.payload | @base64d | fromjson | .predicate'

Authors

License

This program is free software: you can redistribute it and/or modify it under the terms of the MIT License (MIT). See the LICENSE for details.

Tag summary

Content type

Image

Digest

sha256:04675252e

Size

169.3 MB

Last updated

7 days ago

docker pull jfxs/ansible