Skip to content

Commit c433ef2

Browse files
Merge pull request #164 from christ-re/add_ansible_and_ubuntu_version
Add ansible 2.21 version and ubuntu 26.04 version
2 parents eb92d70 + 1e8977d commit c433ef2

3 files changed

Lines changed: 96 additions & 20 deletions

File tree

‎.github/workflows/build.yml‎

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ env:
3030
ANSIBLE_CORE_218: 2.18.9
3131
ANSIBLE_CORE_219: 2.19.2
3232
ANSIBLE_CORE_220: 2.20.0
33+
ANSIBLE_CORE_221: 2.21.0
3334
ANSIBLE_LINT_213: 5.4.0
3435
ANSIBLE_LINT_214: 6.20.3
3536
ANSIBLE_LINT_215: 6.20.3
@@ -38,6 +39,7 @@ env:
3839
ANSIBLE_LINT_218: 25.9.0
3940
ANSIBLE_LINT_219: 25.9.0
4041
ANSIBLE_LINT_220: 25.9.0
42+
ANSIBLE_LINT_221: 26.4.0
4143
ANSIBLE_213: 6.7.0
4244
ANSIBLE_214: 7.7.0
4345
ANSIBLE_215: 8.7.0
@@ -46,6 +48,7 @@ env:
4648
ANSIBLE_218: 11.10.0
4749
ANSIBLE_219: 12.0.0
4850
ANSIBLE_220: 13.0.0
51+
ANSIBLE_221: 14.0.0
4952

5053
concurrency:
5154
group: ${{ github.workflow }}-${{ github.ref }}
@@ -94,6 +97,9 @@ jobs:
9497
- os: alpine-3.20
9598
ansible-version: '220'
9699
tag-version: '2.20'
100+
- os: alpine-3.20
101+
ansible-version: '221'
102+
tag-version: '2.21'
97103

98104
# Alpine 3.21
99105
- os: alpine-3.21
@@ -111,6 +117,9 @@ jobs:
111117
- os: alpine-3.21
112118
ansible-version: '220'
113119
tag-version: '2.20'
120+
- os: alpine-3.21
121+
ansible-version: '221'
122+
tag-version: '2.21'
114123

115124
# Alpine 3.22
116125
- os: alpine-3.22
@@ -128,6 +137,9 @@ jobs:
128137
- os: alpine-3.22
129138
ansible-version: '220'
130139
tag-version: '2.20'
140+
- os: alpine-3.22
141+
ansible-version: '221'
142+
tag-version: '2.21'
131143

132144
# Debian bookworm
133145
- os: debian-bookworm
@@ -170,6 +182,9 @@ jobs:
170182
- os: debian-trixie
171183
ansible-version: '220'
172184
tag-version: '2.20'
185+
- os: debian-trixie
186+
ansible-version: '221'
187+
tag-version: '2.21'
173188

174189
# Debian Trixie Slim
175190
- os: debian-trixie-slim
@@ -184,6 +199,9 @@ jobs:
184199
- os: debian-trixie-slim
185200
ansible-version: '220'
186201
tag-version: '2.20'
202+
- os: debian-trixie-slim
203+
ansible-version: '221'
204+
tag-version: '2.21'
187205

188206
# Rocky Linux 10
189207
- os: rockylinux-10
@@ -201,6 +219,9 @@ jobs:
201219
- os: rockylinux-10
202220
ansible-version: '220'
203221
tag-version: '2.20'
222+
- os: rockylinux-10
223+
ansible-version: '221'
224+
tag-version: '2.21'
204225

205226
# Ubuntu-22.04
206227
- os: ubuntu-22.04
@@ -226,7 +247,17 @@ jobs:
226247
- os: ubuntu-24.04
227248
ansible-version: '220'
228249
tag-version: '2.20'
250+
- os: ubuntu-24.04
251+
ansible-version: '221'
252+
tag-version: '2.21'
229253

254+
# Ubuntu-26.04
255+
- os: ubuntu-26.04
256+
ansible-version: '220'
257+
tag-version: '2.20'
258+
- os: ubuntu-26.04
259+
ansible-version: '221'
260+
tag-version: '2.21'
230261
steps:
231262
- name: Checkout
232263
uses: actions/checkout@v6
@@ -275,9 +306,9 @@ jobs:
275306
tags: |
276307
type=raw,enable=true,value=${{ env.ANSIBLE_CORE_VERSION }}-${{ matrix.os }}
277308
type=raw,enable=true,value=${{ matrix.tag-version }}-${{ matrix.os }}
278-
${{ matrix.os == 'alpine-3.22' && matrix.tag-version == '2.20' && 'type=raw,enable=true,value=latest' || '' }}
279-
${{ matrix.os == 'alpine-3.22' && matrix.tag-version == '2.20' && 'type=raw,enable=true,value=alpine' || '' }}
280-
${{ matrix.os == 'ubuntu-24.04' && matrix.tag-version == '2.20' && 'type=raw,enable=true,value=ubuntu' || '' }}
309+
${{ matrix.os == 'alpine-3.22' && matrix.tag-version == '2.21' && 'type=raw,enable=true,value=latest' || '' }}
310+
${{ matrix.os == 'alpine-3.22' && matrix.tag-version == '2.21' && 'type=raw,enable=true,value=alpine' || '' }}
311+
${{ matrix.os == 'ubuntu-24.04' && matrix.tag-version == '2.21' && 'type=raw,enable=true,value=ubuntu' || '' }}
281312
282313
- name: Build and push Docker image
283314
id: build

‎README.md‎

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ These are the latest Ansible Core versions running within the containers:
1414
- Ansible 2.18: 2.18.9
1515
- Ansible 2.19: 2.19.2
1616
- Ansible 2.20: 2.20.0
17+
- Ansible 2.21: 2.21.0
1718
- Older versions are provided within the unmaintained section, including 2.9, 2.10, 2.11, 2.12, 2.13, 2.14 and 2.15.
1819
- More availablity on Ansible versions on [Ansible Release Documentation](https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html) and [Ansible-core to Python compatibility](https://pypi.org/project/ansible-core/#history).
1920

@@ -23,7 +24,7 @@ These are the latest Ansible Core versions running within the containers:
2324

2425
There are a number of immutable images that are also being collected. To find a specific version of Ansible, look within the [Docker Hub Tags](https://hub.docker.com/r/willhallonline/ansible/tags). Each of the containers follow a similar pattern: **Ansible-version**-**Base OS version**.
2526

26-
### Ansible Core (2.16, 2.17, 2.18, 2.19, 2.20)
27+
### Ansible Core (2.16, 2.17, 2.18, 2.19, 2.20, 2.21)
2728

2829
This includes:
2930

@@ -33,22 +34,23 @@ This includes:
3334

3435
ARM releases should now be available for each container image! This happened in the migration to GitHub Actions, but I forgot to update this line.
3536

36-
| Base Image (↓) \ Ansible Version (→) | Dockerfile | 2.20 | 2.19 | 2.18 | 2.17 | 2.16 |
37-
|--------------------------------------|-----------------------------------------------------------------------------------------------------------------------|---------------------------|-----------------------------|-----------------------------|-----------------------------|-----------------------------|
38-
| Latest | [Dockerfile](https://github.com/willhallonline/docker-ansible/blob/main/ansible-core/alpine-3.22/Dockerfile) | `latest` | | | | |
39-
| Alpine | [Dockerfile](https://github.com/willhallonline/docker-ansible/blob/main/ansible-core/alpine-3.22/Dockerfile) | `alpine` | | | | |
40-
| Ubuntu | [Dockerfile](https://github.com/willhallonline/docker-ansible/blob/main/ansible-core/ubuntu-24.04/Dockerfile) | `ubuntu` | | | | |
41-
| Alpine 3.19 | [Dockerfile](https://github.com/willhallonline/docker-ansible/blob/main/ansible-core/alpine-3.19/Dockerfile) | | `2.19-alpine-3.19` | `2.18-alpine-3.19` | `2.17-alpine-3.19` | `2.16-alpine-3.19` |
42-
| Alpine 3.20 | [Dockerfile](https://github.com/willhallonline/docker-ansible/blob/main/ansible-core/alpine-3.20/Dockerfile) | `2.20-alpine-3.20` | `2.19-alpine-3.20` | `2.18-alpine-3.20` | `2.17-alpine-3.20` | `2.16-alpine-3.20` |
43-
| Alpine 3.21 | [Dockerfile](https://github.com/willhallonline/docker-ansible/blob/main/ansible-core/alpine-3.21/Dockerfile) | `2.20-alpine-3.21` | `2.19-alpine-3.21` | `2.18-alpine-3.21` | `2.17-alpine-3.21` | `2.16-alpine-3.21` |
44-
| Alpine 3.22 | [Dockerfile](https://github.com/willhallonline/docker-ansible/blob/main/ansible-core/alpine-3.22/Dockerfile) | `2.20-alpine-3.22` | `2.19-alpine-3.22` | `2.18-alpine-3.22` | `2.17-alpine-3.22` | `2.16-alpine-3.22` |
45-
| Bookworm (Debian 12) | [Dockerfile](https://github.com/willhallonline/docker-ansible/blob/main/ansible-core/debian-bookworm/Dockerfile) | | `2.19-debian-bookworm` | `2.18-debian-bookworm` | `2.17-debian-bookworm` | `2.16-debian-bookworm` |
46-
| Bookworm Slim (Debian 12) | [Dockerfile](https://github.com/willhallonline/docker-ansible/blob/main/ansible-core/debian-bookworm-slim/Dockerfile) | | `2.19-debian-bookworm-slim` | `2.18-debian-bookworm-slim` | `2.17-debian-bookworm-slim` | `2.16-debian-bookworm-slim` |
47-
| Trixie (Debian 13) | [Dockerfile](https://github.com/willhallonline/docker-ansible/blob/main/ansible-core/debian-trixie/Dockerfile) | `2.20-debian-trixie` | `2.19-debian-trixie` | `2.18-debian-trixie` | `2.17-debian-trixie` | |
48-
| Trixie Slim (Debian 13) | [Dockerfile](https://github.com/willhallonline/docker-ansible/blob/main/ansible-core/debian-trixie-slim/Dockerfile) | `2.20-debian-trixie-slim` | `2.19-debian-trixie-slim` | `2.18-debian-trixie-slim` | `2.17-debian-trixie-slim` | |
49-
| Rocky Linux 10 | [Dockerfile](https://github.com/willhallonline/docker-ansible/blob/main/ansible-core/rockylinux-10/Dockerfile) | `2.20-rockylinux-10` | `2.19-rockylinux-10` | `2.18-rockylinux-10` | `2.17-rockylinux-10` | `2.16-rockylinux-10` |
50-
| Ubuntu 22.04 | [Dockerfile](https://github.com/willhallonline/docker-ansible/blob/main/ansible-core/ubuntu-22.04/Dockerfile) | | | | `2.17-ubuntu-22.04` | `2.16-ubuntu-22.04` |
51-
| Ubuntu 24.04 | [Dockerfile](https://github.com/willhallonline/docker-ansible/blob/main/ansible-core/ubuntu-24.04/Dockerfile) | `2.20-ubuntu-24.04` | `2.19-ubuntu-24.04` | `2.18-ubuntu-24.04` | `2.17-ubuntu-24.04` | `2.16-ubuntu-24.04` |
37+
| Base Image (↓) \ Ansible Version (→) | Dockerfile | 2.21 | 2.20 | 2.19 | 2.18 | 2.17 | 2.16 |
38+
|--------------------------------------|-----------------------------------------------------------------------------------------------------------------------|---------------------------|---------------------------|-----------------------------|-----------------------------|-----------------------------|-----------------------------|
39+
| Latest | [Dockerfile](https://github.com/willhallonline/docker-ansible/blob/main/ansible-core/alpine-3.22/Dockerfile) | `latest` | | | | | |
40+
| Alpine | [Dockerfile](https://github.com/willhallonline/docker-ansible/blob/main/ansible-core/alpine-3.22/Dockerfile) | `alpine` | | | | | |
41+
| Ubuntu | [Dockerfile](https://github.com/willhallonline/docker-ansible/blob/main/ansible-core/ubuntu-24.04/Dockerfile) | `ubuntu` | | | | | |
42+
| Alpine 3.19 | [Dockerfile](https://github.com/willhallonline/docker-ansible/blob/main/ansible-core/alpine-3.19/Dockerfile) | | | `2.19-alpine-3.19` | `2.18-alpine-3.19` | `2.17-alpine-3.19` | `2.16-alpine-3.19` |
43+
| Alpine 3.20 | [Dockerfile](https://github.com/willhallonline/docker-ansible/blob/main/ansible-core/alpine-3.20/Dockerfile) | `2.21-alpine-3.20` | `2.20-alpine-3.20` | `2.19-alpine-3.20` | `2.18-alpine-3.20` | `2.17-alpine-3.20` | `2.16-alpine-3.20` |
44+
| Alpine 3.21 | [Dockerfile](https://github.com/willhallonline/docker-ansible/blob/main/ansible-core/alpine-3.21/Dockerfile) | `2.21-alpine-3.21` | `2.20-alpine-3.21` | `2.19-alpine-3.21` | `2.18-alpine-3.21` | `2.17-alpine-3.21` | `2.16-alpine-3.21` |
45+
| Alpine 3.22 | [Dockerfile](https://github.com/willhallonline/docker-ansible/blob/main/ansible-core/alpine-3.22/Dockerfile) | `2.21-alpine-3.22` | `2.20-alpine-3.22` | `2.19-alpine-3.22` | `2.18-alpine-3.22` | `2.17-alpine-3.22` | `2.16-alpine-3.22` |
46+
| Bookworm (Debian 12) | [Dockerfile](https://github.com/willhallonline/docker-ansible/blob/main/ansible-core/debian-bookworm/Dockerfile) | | | `2.19-debian-bookworm` | `2.18-debian-bookworm` | `2.17-debian-bookworm` | `2.16-debian-bookworm` |
47+
| Bookworm Slim (Debian 12) | [Dockerfile](https://github.com/willhallonline/docker-ansible/blob/main/ansible-core/debian-bookworm-slim/Dockerfile) | | | `2.19-debian-bookworm-slim` | `2.18-debian-bookworm-slim` | `2.17-debian-bookworm-slim` | `2.16-debian-bookworm-slim` |
48+
| Trixie (Debian 13) | [Dockerfile](https://github.com/willhallonline/docker-ansible/blob/main/ansible-core/debian-trixie/Dockerfile) | `2.21-debian-trixie` | `2.20-debian-trixie` | `2.19-debian-trixie` | `2.18-debian-trixie` | `2.17-debian-trixie` | |
49+
| Trixie Slim (Debian 13) | [Dockerfile](https://github.com/willhallonline/docker-ansible/blob/main/ansible-core/debian-trixie-slim/Dockerfile) | `2.21-debian-trixie-slim` | `2.20-debian-trixie-slim` | `2.19-debian-trixie-slim` | `2.18-debian-trixie-slim` | `2.17-debian-trixie-slim` | |
50+
| Rocky Linux 10 | [Dockerfile](https://github.com/willhallonline/docker-ansible/blob/main/ansible-core/rockylinux-10/Dockerfile) | `2.21-rockylinux-10` | `2.20-rockylinux-10` | `2.19-rockylinux-10` | `2.18-rockylinux-10` | `2.17-rockylinux-10` | `2.16-rockylinux-10` |
51+
| Ubuntu 22.04 | [Dockerfile](https://github.com/willhallonline/docker-ansible/blob/main/ansible-core/ubuntu-22.04/Dockerfile) | | | | | `2.17-ubuntu-22.04` | `2.16-ubuntu-22.04` |
52+
| Ubuntu 24.04 | [Dockerfile](https://github.com/willhallonline/docker-ansible/blob/main/ansible-core/ubuntu-24.04/Dockerfile) | `2.21-ubuntu-24.04` | `2.20-ubuntu-24.04` | `2.19-ubuntu-24.04` | `2.18-ubuntu-24.04` | `2.17-ubuntu-24.04` | `2.16-ubuntu-24.04` |
53+
| Ubuntu 26.04 | [Dockerfile](https://github.com/willhallonline/docker-ansible/blob/main/ansible-core/ubuntu-26.04/Dockerfile) | `2.21-ubuntu-26.04` | `2.20-ubuntu-26.04` | | | | |
5254

5355
### Older versions (2.9, 2.10, 2.11, 2.12, 2.13, 2.14, 2.15)
5456

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
FROM ubuntu:26.04
2+
3+
ARG ANSIBLE_CORE_VERSION
4+
ARG ANSIBLE_VERSION
5+
ARG ANSIBLE_LINT
6+
ENV ANSIBLE_CORE_VERSION=${ANSIBLE_CORE_VERSION}
7+
ENV ANSIBLE_VERSION=${ANSIBLE_VERSION}
8+
ENV ANSIBLE_LINT=${ANSIBLE_LINT}
9+
ENV PIPX_BIN_DIR=/usr/local/bin
10+
ENV ANSIBLE_COLLECTIONS_PATH=/root/.local/share/pipx/venvs/ansible/lib/python3.12/site-packages/ansible_collections
11+
12+
# Labels.
13+
LABEL maintainer="will@willhallonline.co.uk" \
14+
org.label-schema.schema-version="1.0" \
15+
org.label-schema.build-date=$BUILD_DATE \
16+
org.label-schema.vcs-ref=$VCS_REF \
17+
org.label-schema.name="willhallonline/ansible" \
18+
org.label-schema.description="Ansible inside Docker" \
19+
org.label-schema.url="https://github.com/willhallonline/docker-ansible" \
20+
org.label-schema.vcs-url="https://github.com/willhallonline/docker-ansible" \
21+
org.label-schema.vendor="Will Hall Online" \
22+
org.label-schema.docker.cmd="docker run --rm -it -v $(pwd):/ansible -v ~/.ssh/id_rsa:/root/id_rsa willhallonline/ansible:2.16-ubuntu-24.04"
23+
24+
# Unfortunately, the mitogen version in the official apt is usually always too old -> recent ansible versions not supported.
25+
# Therefore, the mitogen package is not installed via apt, but via pip
26+
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
27+
apt-get install -y gnupg2 pipx sshpass git openssh-client && \
28+
apt-get install -y python3 python3-pip python3-cffi python3-jmespath && \
29+
pip3 install mitogen --break-system-packages && \
30+
rm -rf /var/lib/apt/lists/* && \
31+
apt-get clean
32+
33+
RUN pipx install ansible-core==${ANSIBLE_CORE_VERSION} ansible==${ANSIBLE_VERSION} ansible-lint==${ANSIBLE_LINT} && \
34+
pipx install pywinrm --include-deps && \
35+
rm -rf /root/.cache/pip*
36+
37+
RUN mkdir /ansible && \
38+
mkdir -p /etc/ansible && \
39+
echo 'localhost' > /etc/ansible/hosts
40+
41+
WORKDIR /ansible
42+
43+
CMD [ "ansible-playbook", "--version" ]

0 commit comments

Comments
 (0)