Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add openssh-client and 2.15.9 core #8

Merged
merged 2 commits into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 $@"
```
Loading