From b21c8d6128a96ab7a5b5f393c5bae7b240429aa6 Mon Sep 17 00:00:00 2001 From: Roman Dodin Date: Thu, 15 Feb 2024 09:53:52 +0100 Subject: [PATCH] Add openssh-client and 2.15.9 core (#8) * added openssh-client * added 2.15.9 --- .github/matrix.yml | 14 ++++++++++++++ Dockerfile | 2 ++ README.md | 24 +++++++++++++++++++++++- 3 files changed, 39 insertions(+), 1 deletion(-) diff --git a/.github/matrix.yml b/.github/matrix.yml index 5383ca2..2350b70 100644 --- a/.github/matrix.yml +++ b/.github/matrix.yml @@ -59,3 +59,17 @@ include: ansible-core-version: "2.15.5" runs-on: "ubuntu-22.04" addional-tags: "latest" + + # 2.15.9 + - base-image: "pypy:3.10-slim" + ansible-core-version: "2.15.9" + runs-on: "ubuntu-22.04" + + - base-image: "python:3.11-slim" + ansible-core-version: "2.15.9" + runs-on: "ubuntu-22.04" + + - base-image: "python:3.12-slim" + ansible-core-version: "2.15.9" + runs-on: "ubuntu-22.04" + addional-tags: "latest" diff --git a/Dockerfile b/Dockerfile index 74d2419..0defd55 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,8 @@ FROM ${BASE_IMAGE} ARG ANSIBLE_CORE_VERSION=2.15.4 +RUN apt update && apt install -y openssh-client + RUN pip install --no-cache-dir ansible-core==${ANSIBLE_CORE_VERSION} CMD [ "bash" ] \ No newline at end of file diff --git a/README.md b/README.md index 49f8b4e..77075cc 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,31 @@ This repository contains the source for building ansible-core container image us * pypy (slim) * python (slim) -The image is tagged with the python backend/version and a matching ansible-core version, e.g.: +The image is [tagged](https://github.com/orgs/srl-labs/packages?repo_name=ansible-core) with the python backend/version and a matching ansible-core version, e.g.: * `ghcr.io/srl-labs/ansible-core/pypy3.10:2.12.0` for pypy3.10 backend and ansible-core 2.12.0 * `ghcr.io/srl-labs/ansible-core/py3.10:2.12.0` for python3.10 backend and ansible-core 2.12.0 Images are built for linux/amd64 and linux/arm64 architectures. + +## Build + +Automated builds are setup for the repository and the matrix of base images, ansible core version and python version are listed in the [`matrix.yml`](.github/matrix.yml) file. Add additional version to the matrix, push the changes in a branch and wait for tests to pass. + +If all good, merge the PR and create a release adding a date as a release name to indicate when it was released. + +## Usage + +Can be used as a base image for container images with the required plugins/roles or as a standalone container for running ansible playbooks. + +```bash +alias ansible-playbook="docker run --rm -it \ + -w /ansible \ + -v $(pwd):/ansible \ + -v ~/.ssh:/root/.ssh \ + -v /etc/hosts:/etc/hosts \ + -e SSH_AUTH_SOCK=/tmp/ssh_agent_socket \ + -v $(echo $SSH_AUTH_SOCK):/tmp/ssh_agent_socket \ + ghcr.io/srl-labs/ansible-core/2.15.9:py3.11 \ + ansible-playbook -i inventory.yml $@" +```