Sign inSign up

jillesca/ansible

By jillesca

•Updated almost 4 years ago

Ansible base image based on python alpine 3.16

Image
1

180

jillesca/ansible repository overview

This is an ansible image running on python alpine. Intended for pipelines.

For a detailed guide on how to use it and source files see my post about ansible in a container⁠

/ # ansible --version
ansible [core 2.13.5]
  config file = None
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.10/site-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible
  python version = 3.10.8 (main, Oct 13 2022, 23:21:19) [GCC 11.2.1 20220219]
  jinja version = 3.1.2
  libyaml = False
/ #

The image was built using:

# syntax=docker/dockerfile:1
FROM python:alpine3.16 AS base
COPY ./docker/image/requirements.txt .
RUN apk add \
    gcc \
    musl-dev \
    linux-headers \
    libssh-dev \
    openssh-client \
    && pip3 install -r requirements.txt
WORKDIR /home

The requirements used are:

ansible==6.5.0
ansible-core==2.13.5
ansible-pylibssh==1.0.0
certifi==2022.9.24
cffi==1.15.1
charset-normalizer==2.1.1
cryptography==38.0.1
idna==3.4
Jinja2==3.1.2
MarkupSafe==2.1.1
packaging==21.3
pycparser==2.21
pyparsing==3.0.9
PyYAML==6.0
requests==2.28.1
resolvelib==0.8.1
urllib3==1.26.12
paramiko==2.11.0

The CML version has a virl2-client specific to a CML in cisco sandbox. The image was created as follows:

FROM jillesca/ansible:version1.1 as cml
RUN pip install virl2-client==2.2.1.post2 \
    && ansible-galaxy collection install cisco.cml

Tag summary

Content type

Image

Digest

sha256:7011d2f7a…

Size

199.2 MB

Last updated

almost 4 years ago

docker pull jillesca/ansible:cml1.1