Skip to content

Commit

Permalink
Add openssh-client and 2.15.9 core (#8)
Browse files Browse the repository at this point in the history
* added openssh-client

* added 2.15.9
  • Loading branch information
hellt authored Feb 15, 2024
1 parent a417f29 commit b21c8d6
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .github/matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 $@"
```

0 comments on commit b21c8d6

Please sign in to comment.