46 Commits

Author SHA1 Message Date
bd5ef263d7 fix(ci): specify dependency correctly
Some checks failed
Build / build-arch-linux (push) Has been cancelled
Build / build-rocky-linux-8 (push) Has been cancelled
Release / push-arch-linux (push) Successful in 19m0s
Release / push-rocky-linux-8 (push) Failing after 1m4s
Release / sync-to-hub-docker-io (push) Has been skipped
2025-05-08 12:24:29 +02:00
50511720eb docs(README): add example
Some checks are pending
Build / build-arch-linux (push) Waiting to run
Build / build-rocky-linux-8 (push) Waiting to run
Update Docker Hub Description / update-description-on-hub-docker-io (push) Successful in 10s
2025-05-08 12:23:22 +02:00
395be4db9e fix(ci): replace drone with gitea actions
Some checks failed
Update Docker Hub Description / update-description-on-hub-docker-io (push) Failing after 11s
Build / build-arch-linux (push) Successful in 9m54s
Build / build-rocky-linux-8 (push) Has been cancelled
Release / push-arch-linux (push) Has been cancelled
Release / push-rocky-linux-8 (push) Has been cancelled
Release / sync-to-hub-docker-io (push) Has been cancelled
2025-05-08 12:07:07 +02:00
8044e5941e fix(rockylinux-8): upgrade python, pip and boto3 2025-05-08 11:58:15 +02:00
2ffe90c2e4 fix(drone): remove manifest tpl 2025-05-07 14:44:39 +02:00
f09a9348d4 fix(rockylinux8): install python3-boto3 2025-05-07 14:41:11 +02:00
ef2799d375 fix(drone): remove configuration 2025-05-07 14:40:36 +02:00
9aa0361c36 fix(rockylinux-8): init 2025-05-07 14:08:34 +02:00
9d219ab8a8 fix(archlinux): rename make targets 2025-05-07 13:56:43 +02:00
43abfd2cc5 fix: add boto3 and botocore 2025-05-07 11:18:15 +02:00
b9cf2b9d9e chore(ci): use upstream container image registry
Some checks reported errors
continuous-integration/drone/push Build was killed
2025-04-02 21:30:29 +02:00
5446032c75 chore(ci): rollback plugins/docker to 20.18.6
Some checks failed
continuous-integration/drone/push Build is failing
2025-04-02 10:42:52 +02:00
a4c19c776f chore(ci): use container image mirror
Some checks failed
continuous-integration/drone/push Build is failing
2025-04-02 09:53:27 +02:00
f202483847 chore(deps): update git.cryptic.systems/volker.raschek/markdownlint docker tag to v0.44.0
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2025-04-01 19:01:15 +00:00
04700e8dc1 fix(Makefile): make FQIN configurable
Some checks failed
continuous-integration/drone/push Build is failing
2025-04-01 20:44:51 +02:00
ce22ec4e43 chore(renovate): use configuration preset
Some checks failed
continuous-integration/drone/push Build is failing
2025-03-30 20:51:00 +02:00
89098ecb4d chore(deps): update docker.io/plugins/docker docker tag to v20.18.8
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2025-03-26 20:01:30 +00:00
c6dbd46513 chore(deps): update quay.io/skopeo/stable docker tag to v1.18.0
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2025-02-28 17:01:36 +00:00
4f6bcb39aa chore(deps): update docker.io/plugins/docker docker tag to v20.18.7
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2025-02-18 08:00:51 +00:00
a9248e9d7b chore(deps): update git.cryptic.systems/volker.raschek/git docker tag to v1.4.0
Some checks failed
continuous-integration/drone/push Build is failing
2024-12-03 17:23:07 +00:00
f12182c91a chore(deps): update docker.io/plugins/docker docker tag to v20.18.5
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2024-12-03 17:01:09 +00:00
4f759cc163 chore(deps): update git.cryptic.systems/volker.raschek/markdownlint docker tag to v0.43.0
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2024-12-03 14:01:24 +00:00
732172c67d chore(deps): update quay.io/skopeo/stable docker tag to v1.17.0
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2024-11-21 17:00:50 +00:00
cde40de9a5 chore(deps): update docker.io/plugins/docker docker tag to v20.18.4
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2024-10-15 07:02:23 +00:00
0508621590 chore(deps): update quay.io/skopeo/stable docker tag to v1.16.1
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2024-10-14 19:48:03 +00:00
cf0d404174 chore(deps): update git.cryptic.systems/volker.raschek/markdownlint docker tag to v0.42.0
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2024-10-14 19:01:10 +00:00
c82c185ef5 chore(deps): update quay.io/skopeo/stable docker tag to v1.15.2
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2024-07-16 16:00:37 +00:00
1afc061400 chore(deps): update docker.io/plugins/docker docker tag to v20.18.1
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2024-07-15 22:00:47 +00:00
50b6754ce1 chore(deps): update docker.io/plugins/docker docker tag to v20.18.0
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2024-07-13 12:09:36 +00:00
d575f2837c chore(deps): update quay.io/skopeo/stable docker tag to v1.15.1
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2024-06-01 16:00:25 +00:00
cd68eff942 chore(deps): update git.cryptic.systems/volker.raschek/markdownlint docker tag to v0.41.0
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2024-05-27 13:01:23 +00:00
fe15a531e7 chore(deps): update docker.io/plugins/docker docker tag to v20.17.5
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2024-05-20 13:01:24 +00:00
723ea99000 chore(deps): update docker.io/plugins/docker docker tag to v20.17.4
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2024-05-13 10:00:31 +00:00
502fc11f1e chore(deps): update git.cryptic.systems/volker.raschek/markdownlint docker tag to v0.40.0
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2024-05-07 22:00:41 +00:00
b6df3aaf94 chore(deps): update quay.io/skopeo/stable docker tag to v1.15.0
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2024-03-31 16:01:26 +00:00
4fad29ccee chore(deps): update docker.io/plugins/docker docker tag to v20.17.3
Some checks reported errors
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build encountered an error
2024-03-11 08:01:23 +00:00
b1da296a4a chore(deps): update quay.io/skopeo/stable docker tag to v1.14.2
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2024-02-18 17:01:01 +00:00
29bed13c8b chore(deps): update git.cryptic.systems/volker.raschek/markdownlint docker tag to v0.39.0
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2024-01-28 23:01:00 +00:00
1968112a35 fix(renovate): remove automerge options
Some checks failed
continuous-integration/drone/push Build is failing
2024-01-21 14:34:35 +01:00
956bc97c91 Merge pull request 'chore(deps): update docker.io/plugins/docker docker tag to v20.17.2' (#17) from renovate/docker.io-plugins-docker-20.x into master
Some checks failed
continuous-integration/drone/push Build is failing
2024-01-11 20:15:46 +00:00
00928c60f1 chore(deps): update docker.io/plugins/docker docker tag to v20.17.2
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-01-11 20:01:19 +00:00
58bd5ba87b fix(renovate): enable automerge for docker.io/plugins/docker
Some checks failed
continuous-integration/drone/push Build is failing
2024-01-11 18:08:33 +01:00
9c7cece339 chore(deps): update git.cryptic.systems/volker.raschek/markdownlint docker tag to v0.38.0
Some checks are pending
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is running
2023-12-09 16:17:39 +01:00
838aa157c1 chore(deps): update quay.io/skopeo/stable docker tag to v1.14.0
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2023-12-06 17:15:34 +01:00
0528249989 Merge pull request 'chore(deps): update docker.io/plugins/docker docker tag to v20.17.1' (#14) from renovate/docker.io-plugins-docker-20.x into master
Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: volker.raschek/ansible-archlinux-docker#14
2023-12-01 20:59:33 +00:00
b8b8196c73 chore(deps): update docker.io/plugins/docker docker tag to v20.17.1
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2023-11-15 14:01:46 +00:00
11 changed files with 260 additions and 361 deletions

View File

@ -1,298 +0,0 @@
---
kind: pipeline
type: kubernetes
name: linter
clone:
disable: true
steps:
- name: clone
image: git.cryptic.systems/volker.raschek/git:1.3.1
- name: markdown lint
commands:
- markdownlint *.md
image: git.cryptic.systems/volker.raschek/markdownlint:0.37.0
resources:
limits:
cpu: 150
memory: 150M
- name: email-notification
environment:
SMTP_FROM_ADDRESS:
from_secret: smtp_from_address
SMTP_FROM_NAME:
from_secret: smtp_from_name
SMTP_HOST:
from_secret: smtp_host
SMTP_USERNAME:
from_secret: smtp_username
SMTP_PASSWORD:
from_secret: smtp_password
image: git.cryptic.systems/volker.raschek/drone-email:0.1.5
resources:
limits:
cpu: 150
memory: 150M
when:
status:
- changed
- failure
trigger:
event:
exclude:
- tag
---
kind: pipeline
type: docker
name: dry-run-amd64
clone:
disable: true
depends_on:
- linter
platform:
os: linux
arch: amd64
steps:
- name: clone
image: git.cryptic.systems/volker.raschek/git:1.3.1
- name: build
image: docker.io/plugins/docker:20.15.0
settings:
auto_tag: false
dockerfile: Dockerfile
dry_run: true
force_tag: true
no_cache: true
purge: true
mirror:
from_secret: docker_io_mirror
registry: git.cryptic.systems
repo: git.cryptic.systems/volker.raschek/ansible-archlinux
username:
from_secret: git_cryptic_systems_container_registry_user
password:
from_secret: git_cryptic_systems_container_registry_password
- name: email-notification
environment:
SMTP_FROM_ADDRESS:
from_secret: smtp_from_address
SMTP_FROM_NAME:
from_secret: smtp_from_name
SMTP_HOST:
from_secret: smtp_host
SMTP_USERNAME:
from_secret: smtp_username
SMTP_PASSWORD:
from_secret: smtp_password
image: git.cryptic.systems/volker.raschek/drone-email:0.1.5
when:
status:
- changed
- failure
trigger:
branch:
exclude:
- master
event:
- pull_request
- push
repo:
- volker.raschek/ansible-archlinux-docker
---
kind: pipeline
type: docker
name: latest-amd64
clone:
disable: true
depends_on:
- linter
platform:
os: linux
arch: amd64
steps:
- name: clone
image: git.cryptic.systems/volker.raschek/git:1.3.1
- name: build
image: docker.io/plugins/docker:20.15.0
settings:
auto_tag: false
dockerfile: Dockerfile
force_tag: true
no_cache: true
purge: true
mirror:
from_secret: docker_io_mirror
registry: git.cryptic.systems
repo: git.cryptic.systems/volker.raschek/ansible-archlinux
tags: latest-amd64
username:
from_secret: git_cryptic_systems_container_registry_user
password:
from_secret: git_cryptic_systems_container_registry_password
- name: email-notification
environment:
SMTP_FROM_ADDRESS:
from_secret: smtp_from_address
SMTP_FROM_NAME:
from_secret: smtp_from_name
SMTP_HOST:
from_secret: smtp_host
SMTP_USERNAME:
from_secret: smtp_username
SMTP_PASSWORD:
from_secret: smtp_password
image: git.cryptic.systems/volker.raschek/drone-email:0.1.5
when:
status:
- changed
- failure
trigger:
branch:
- master
event:
- cron
- push
repo:
- volker.raschek/ansible-archlinux-docker
---
kind: pipeline
type: kubernetes
name: latest-manifest
clone:
disable: true
depends_on:
- latest-amd64
# docker.io/plugins/manifest only for amd64 architectures available
node_selector:
kubernetes.io/os: linux
kubernetes.io/arch: amd64
steps:
- name: clone
image: git.cryptic.systems/volker.raschek/git:1.3.1
- name: build-manifest
image: docker.io/plugins/manifest:1.4.0
settings:
auto_tag: false
ignore_missing: true
spec: manifest.tmpl
username:
from_secret: git_cryptic_systems_container_registry_user
password:
from_secret: git_cryptic_systems_container_registry_password
- name: email-notification
environment:
SMTP_FROM_ADDRESS:
from_secret: smtp_from_address
SMTP_FROM_NAME:
from_secret: smtp_from_name
SMTP_HOST:
from_secret: smtp_host
SMTP_USERNAME:
from_secret: smtp_username
SMTP_PASSWORD:
from_secret: smtp_password
image: git.cryptic.systems/volker.raschek/drone-email:0.1.5
resources:
limits:
cpu: 150
memory: 150M
when:
status:
- changed
- failure
trigger:
branch:
- master
event:
- cron
- push
repo:
- volker.raschek/ansible-archlinux-docker
---
kind: pipeline
type: kubernetes
name: latest-sync
clone:
disable: true
depends_on:
- latest-manifest
steps:
- name: clone
image: git.cryptic.systems/volker.raschek/git:1.3.1
- name: latest-sync
commands:
- skopeo sync --all --src=docker --src-creds=$SRC_CRED_USERNAME:$SRC_CRED_PASSWORD --dest=docker --dest-creds=$DEST_CRED_USERNAME:$DEST_CRED_PASSWORD git.cryptic.systems/volker.raschek/ansible-archlinux docker.io/volkerraschek
environment:
SRC_CRED_USERNAME:
from_secret: git_cryptic_systems_container_registry_user
SRC_CRED_PASSWORD:
from_secret: git_cryptic_systems_container_registry_password
DEST_CRED_USERNAME:
from_secret: container_image_registry_user
DEST_CRED_PASSWORD:
from_secret: container_image_registry_password
image: quay.io/skopeo/stable:v1.13.3
- name: email-notification
environment:
SMTP_FROM_ADDRESS:
from_secret: smtp_from_address
SMTP_FROM_NAME:
from_secret: smtp_from_name
SMTP_HOST:
from_secret: smtp_host
SMTP_USERNAME:
from_secret: smtp_username
SMTP_PASSWORD:
from_secret: smtp_password
image: git.cryptic.systems/volker.raschek/drone-email:0.1.5
resources:
limits:
cpu: 150
memory: 150M
when:
status:
- changed
- failure
trigger:
branch:
- master
event:
- cron
- push
repo:
- volker.raschek/ansible-archlinux-docker

View File

@ -0,0 +1,45 @@
name: Build
on:
pull_request:
types:
- "opened"
- "reopened"
- "synchronize"
push:
branches:
- master
workflow_dispatch: {}
jobs:
build-arch-linux:
runs-on: ubuntu-latest-amd64
steps:
- uses: actions/checkout@v4.2.2
- uses: docker/setup-qemu-action@v3.6.0
- uses: docker/setup-buildx-action@v3.10.0
- name: Build image
run: |
TAG=latest
docker buildx build \
--file Dockerfile.archlinux \
--tag git.cryptic.systems/volker.raschek/ansible:${TAG}-archlinux \
.
build-rocky-linux-8:
runs-on: ubuntu-latest-amd64
steps:
- uses: actions/checkout@v4.2.2
- uses: docker/setup-qemu-action@v3.6.0
- uses: docker/setup-buildx-action@v3.10.0
- name: Build image
run: |
TAG=latest
docker buildx build \
--file Dockerfile.rockylinux8 \
--tag git.cryptic.systems/volker.raschek/ansible:${TAG}-rockylinux-8 \
.

View File

@ -0,0 +1,77 @@
name: Release
on:
push:
tags:
- "**"
jobs:
push-arch-linux:
runs-on: ubuntu-latest-amd64
steps:
- uses: actions/checkout@v4.2.2
- uses: docker/setup-qemu-action@v3.6.0
- uses: docker/setup-buildx-action@v3.10.0
- uses: docker/login-action@v3.4.0
with:
registry: git.cryptic.systems
username: ${{ github.repository_owner }}
password: ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }}
- name: Build image
run: |
TAG=latest
docker buildx build \
--file Dockerfile.archlinux \
--push \
--tag git.cryptic.systems/volker.raschek/ansible:${TAG}-archlinux \
.
push-rocky-linux-8:
runs-on: ubuntu-latest-amd64
steps:
- uses: actions/checkout@v4.2.2
- uses: docker/setup-qemu-action@v3.6.0
- uses: docker/setup-buildx-action@v3.10.0
- uses: docker/login-action@v3.4.0
with:
registry: git.cryptic.systems
username: ${{ github.repository_owner }}
password: ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }}
- name: Build image
run: |
TAG=latest
docker buildx build \
--file Dockerfile \
--push \
--tag git.cryptic.systems/volker.raschek/ansible:${TAG}-rockylinux-8 \
.
sync-to-hub-docker-io:
needs:
- push-arch-linux
- push-rocky-linux-8
runs-on: ubuntu-latest
steps:
- name: Copy images to docker.io
run: |
TAG=$(echo ${{ github.ref_name }} | sed 's/v//gm')
apt-get update --yes
apt-get install --yes skopeo
for suffix in archlinux rockylinux-8; do
skopeo copy \
--all \
--dest-password ${{ secrets.DOCKER_IO_PASSWORD }} \
--dest-username ${{ secrets.DOCKER_IO_USERNAME }} \
--src-password ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }} \
--src-username volker.raschek \
docker://git.cryptic.systems/volker.raschek/ansible:${TAG}-${suffix} \
docker://docker.io/volkerraschek/ansible:${TAG}-${suffix}
done

View File

@ -0,0 +1,21 @@
name: Update Docker Hub Description
on:
push:
branches:
- master
paths:
- README.md
jobs:
update-description-on-hub-docker-io:
runs-on:
- ubuntu-latest
steps:
- uses: actions/checkout@v4.2.2
- uses: peter-evans/dockerhub-description@v4.0.2
with:
username: ${{ secrets.DOCKER_IO_USERNAME }}
password: ${{ secrets.DOCKER_IO_PASSWORD }}
repository: volkerraschek/ansible
readme-filepath: README.md

View File

@ -45,19 +45,17 @@ MD012:
# MD013/line-length - Line length # MD013/line-length - Line length
MD013: MD013:
# Number of characters # Number of characters
line_length: 80 line_length: 120
# Number of characters for headings # Number of characters for headings
heading_line_length: 80 heading_line_length: 120
# Number of characters for code blocks # Number of characters for code blocks
code_block_line_length: 80 code_block_line_length: 120
# Include code blocks # Include code blocks
code_blocks: false code_blocks: false
# Include tables # Include tables
tables: false tables: false
# Include headings # Include headings
headings: true headings: true
# Include headings
headers: true
# Strict length checking # Strict length checking
strict: false strict: false
# Stern length checking # Stern length checking

View File

@ -9,6 +9,8 @@ RUN pacman --sync --sysupgrade --refresh --noconfirm && \
openssl \ openssl \
libyaml \ libyaml \
python \ python \
python-boto3 \
python-botocore \
python-setuptools \ python-setuptools \
python-pip \ python-pip \
python-pytest \ python-pytest \
@ -31,7 +33,7 @@ RUN locale-gen en_US.UTF-8
# Install Ansible inventory file # Install Ansible inventory file
RUN mkdir --parents /etc/ansible RUN mkdir --parents /etc/ansible
RUN echo "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts RUN echo -e "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts
# Remove unnecessary getty and udev targets that result in high CPU usage when # Remove unnecessary getty and udev targets that result in high CPU usage when
# using multiple containers with molecule # using multiple containers with molecule
@ -40,4 +42,3 @@ RUN rm --recursive --force /lib/systemd/system/systemd*udev* && \
rm --recursive --force /lib/systemd/system/getty.target rm --recursive --force /lib/systemd/system/getty.target
VOLUME [ "/sys/fs/cgroup", "/tmp", "/run"] VOLUME [ "/sys/fs/cgroup", "/tmp", "/run"]
CMD [ "/lib/systemd/systemd" ]

31
Dockerfile.rockylinux8 Normal file
View File

@ -0,0 +1,31 @@
FROM docker.io/library/rockylinux:8
RUN dnf update --assumeyes && \
dnf install --assumeyes bash-completion sudo && \
dnf install --assumeyes epel-release && \
dnf install --assumeyes ansible && \
dnf remove --assumeyes epel-release && \
dnf install --assumeyes 'dnf-command(config-manager)' && \
dnf config-manager --set-enabled ha && \
dnf install --assumeyes python3-boto3 python3-botocore && \
dnf clean all
# We must change python to 3.12 (default 3.6), to be compliant with ansible-core. Furthermore, we must upgrade pip to
# latest version. Otherwise is still used pip for python 3.6. At least, we install boto3, which is required for the aws
# dynamic inventory manually, because the official python-boto3 package is for python 3.6.
RUN alternatives --set python3 /usr/bin/python3.12 && \
curl --fail --silent --location https://bootstrap.pypa.io/get-pip.py --output get-pip.py && \
python3 get-pip.py && \
pip install boto3
# Create default ansible inventory file
RUN mkdir --parents /etc/ansible
RUN echo -e "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts
# Remove unnecessary getty and udev targets that result in high CPU usage when
# using multiple containers with molecule
# (https://github.com/ansible/molecule/issues/1104)
RUN rm --recursive --force /lib/systemd/system/systemd*udev* && \
rm --recursive --force /lib/systemd/system/getty.target
VOLUME [ "/sys/fs/cgroup", "/tmp", "/run"]

View File

@ -3,41 +3,71 @@
# container runtime. This is needed to start and run a container image. # container runtime. This is needed to start and run a container image.
CONTAINER_RUNTIME?=$(shell which podman) CONTAINER_RUNTIME?=$(shell which podman)
# CONTAINER_IMAGE # ArchLinux
# Defines the name of the new container to be built using several variables. ANSIBLE_ARCH_IMAGE_REGISTRY_HOST?=git.cryptic.systems
BUILD_IMAGE_REGISTRY_HOST:=git.cryptic.systems ANSIBLE_ARCH_IMAGE_REGISTRY_USER?=volker.raschek
BUILD_IMAGE_REGISTRY_USER:=volker.raschek ANSIBLE_ARCH_IMAGE_NAMESPACE?=${ANSIBLE_ARCH_IMAGE_REGISTRY_USER}
BUILD_IMAGE_NAMESPACE?=${BUILD_IMAGE_REGISTRY_USER} ANSIBLE_ARCH_IMAGE_REPOSITORY:=ansible
BUILD_IMAGE_REPOSITORY:=ansible-archlinux ANSIBLE_ARCH_IMAGE_VERSION?=latest
BUILD_IMAGE_VERSION?=latest ANSIBLE_ARCH_IMAGE_VERSION_SUFFIX=arch-linux
BUILD_IMAGE_FULLY_QUALIFIED=${BUILD_IMAGE_REGISTRY_HOST}/${BUILD_IMAGE_NAMESPACE}/${BUILD_IMAGE_REPOSITORY}:${BUILD_IMAGE_VERSION} ANSIBLE_ARCH_IMAGE_FULLY_QUALIFIED=${ANSIBLE_ARCH_IMAGE_REGISTRY_HOST}/${ANSIBLE_ARCH_IMAGE_NAMESPACE}/${ANSIBLE_ARCH_IMAGE_REPOSITORY}:${ANSIBLE_ARCH_IMAGE_VERSION}-${ANSIBLE_ARCH_IMAGE_VERSION_SUFFIX}
BUILD_IMAGE_UNQUALIFIED=${BUILD_IMAGE_NAMESPACE}/${BUILD_IMAGE_REPOSITORY}:${BUILD_IMAGE_VERSION}
# BUILD CONTAINER IMAGE # RockyLinux8
ANSIBLE_RL8_IMAGE_REGISTRY_HOST?=git.cryptic.systems
ANSIBLE_RL8_IMAGE_REGISTRY_USER?=volker.raschek
ANSIBLE_RL8_IMAGE_NAMESPACE?=${ANSIBLE_RL8_IMAGE_REGISTRY_USER}
ANSIBLE_RL8_IMAGE_REPOSITORY:=ansible
ANSIBLE_RL8_IMAGE_VERSION?=latest
ANSIBLE_RL8_IMAGE_VERSION_SUFFIX=rockylinux-8
ANSIBLE_RL8_IMAGE_FULLY_QUALIFIED=${ANSIBLE_RL8_IMAGE_REGISTRY_HOST}/${ANSIBLE_RL8_IMAGE_NAMESPACE}/${ANSIBLE_RL8_IMAGE_REPOSITORY}:${ANSIBLE_RL8_IMAGE_VERSION}-${ANSIBLE_RL8_IMAGE_VERSION_SUFFIX}
# BUILD ANSIBLE ARCHLINUX CONTAINER IMAGE
# ============================================================================== # ==============================================================================
PHONY:=container-image/build PHONY:=container-image/build/arch-linux
container-image/build: container-image/build/arch-linux:
${CONTAINER_RUNTIME} build \ ${CONTAINER_RUNTIME} build \
--file Dockerfile \ --file Dockerfile.archlinux \
--no-cache \ --no-cache \
--pull \ --pull \
--tag ${BUILD_IMAGE_FULLY_QUALIFIED} \ --tag ${ANSIBLE_ARCH_IMAGE_FULLY_QUALIFIED} \
--tag ${BUILD_IMAGE_UNQUALIFIED} \
. .
# DELETE CONTAINER IMAGE # DELETE ANSIBLE ARCHLINUX CONTAINER IMAGE
# ============================================================================== # ==============================================================================
PHONY:=container-image/delete PHONY:=container-image/delete/arch-linux
container-image/delete: container-image/delete/arch-linux:
- ${CONTAINER_RUNTIME} image rm ${BUILD_IMAGE_FULLY_QUALIFIED} ${BUILD_IMAGE_UNQUALIFIED} - ${CONTAINER_RUNTIME} image rm ${ANSIBLE_ARCH_IMAGE_FULLY_QUALIFIED}
- ${CONTAINER_RUNTIME} image rm ${BASE_IMAGE_FULLY_QUALIFIED}
# PUSH CONTAINER IMAGE # PUSH ANSIBLE ARCHLINUX CONTAINER IMAGE
# ============================================================================== # ==============================================================================
PHONY+=container-image/push PHONY+=container-image/push/arch-linux
container-image/push: container-image/push/arch-linux:
echo ${BUILD_IMAGE_REGISTRY_PASSWORD} | ${CONTAINER_RUNTIME} login ${BUILD_IMAGE_REGISTRY_HOST} --username ${BUILD_IMAGE_REGISTRY_USER} --password-stdin echo ${ANSIBLE_ARCH_IMAGE_REGISTRY_PASSWORD} | ${CONTAINER_RUNTIME} login ${ANSIBLE_ARCH_IMAGE_REGISTRY_HOST} --username ${ANSIBLE_ARCH_IMAGE_REGISTRY_USER} --password-stdin
${CONTAINER_RUNTIME} push ${BUILD_IMAGE_FULLY_QUALIFIED} ${CONTAINER_RUNTIME} push ${ANSIBLE_ARCH_IMAGE_FULLY_QUALIFIED}
# BUILD ANSIBLE RL8 CONTAINER IMAGE
# ==============================================================================
PHONY:=container-image/build/rocky-linux-8
container-image/build/rocky-linux-8:
${CONTAINER_RUNTIME} build \
--file Dockerfile.rockylinux8 \
--no-cache \
--pull \
--tag ${ANSIBLE_RL8_IMAGE_FULLY_QUALIFIED} \
.
# DELETE ANSIBLE RL8 CONTAINER IMAGE
# ==============================================================================
PHONY:=container-image/delete/rocky-linux-8
container-image/delete/rocky-linux-8:
- ${CONTAINER_RUNTIME} image rm ${ANSIBLE_RL8_IMAGE_FULLY_QUALIFIED}
# PUSH ANSIBLE RL8 CONTAINER IMAGE
# ==============================================================================
PHONY+=container-image/push/rocky-linux-8
container-image/push/rocky-linux-8:
echo ${ANSIBLE_ARCH_IMAGE_REGISTRY_PASSWORD} | ${CONTAINER_RUNTIME} login ${ANSIBLE_ARCH_IMAGE_REGISTRY_HOST} --username ${ANSIBLE_ARCH_IMAGE_REGISTRY_USER} --password-stdin
${CONTAINER_RUNTIME} push ${ANSIBLE_ARCH_IMAGE_FULLY_QUALIFIED}
# PHONY # PHONY
# ============================================================================== # ==============================================================================

View File

@ -1,4 +1,21 @@
# ansible-archlinux-docker # ansible
[![Build Status](https://drone.cryptic.systems/api/badges/volker.raschek/ansible-archlinux-docker/status.svg)](https://drone.cryptic.systems/volker.raschek/ansible-archlinux-docker)
[![Docker Pulls](https://img.shields.io/docker/pulls/volkerraschek/ansible-archlinux)](https://hub.docker.com/r/volkerraschek/ansible-archlinux) [![Docker Pulls](https://img.shields.io/docker/pulls/volkerraschek/ansible-archlinux)](https://hub.docker.com/r/volkerraschek/ansible-archlinux)
This container image can be used to execute ansible. It contains the latest versions of ansible-core, ansible-lint and
python-boto3 to interact with AWS dynamic inventory.
Here is an example. The environment variables as well as the path to the playbook and inventory must of course be
adapted to your own needs.
```bash
docker run \
--env AWS_ACCESS_KEY_ID \
--env AWS_SECRET_ACCESS_KEY \
--env AWS_SESSION_TOKEN \
--rm \
--volume $(pwd):$(pwd) \
--workdir $(pwd) \
git.cryptic.systems/volkerraschek/ansible:latest \
bash -c "ansible-galaxy install -r requirements.yaml && ansible-playbook -i inventories/demo.aws_ec2.yaml aws.yaml"
```

View File

@ -1,14 +0,0 @@
image: git.cryptic.systems/volker.raschek/ansible-archlinux:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
{{#if build.tags}}
tags:
{{#each build.tags}}
- {{this}}
{{/each}}
- "latest"
{{/if}}
manifests:
-
image: git.cryptic.systems/volker.raschek/ansible-archlinux:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}-amd64
platform:
architecture: amd64
os: linux

View File

@ -1,18 +1,9 @@
{ {
"$schema": "https://docs.renovatebot.com/renovate-schema.json", "$schema": "https://docs.renovatebot.com/renovate-schema.json",
"assignees": [ "volker.raschek" ], "extends": [
"automergeStrategy": "merge-commit", "local>volker.raschek/renovate-config:default#master",
"automergeType": "pr", "local>volker.raschek/renovate-config:container#master",
"labels": [ "renovate" ], "local>volker.raschek/renovate-config:actions#master",
"packageRules": [ "local>volker.raschek/renovate-config:regexp#master"
{ ]
"addLabels": [ "renovate/droneci", "renovate/automerge" ],
"automerge": true,
"excludePackagePatterns": [ "plugins/docker" ],
"matchManagers": "droneci",
"matchUpdateTypes": [ "minor", "patch"]
}
],
"rebaseLabel": "renovate/rebase",
"rebaseWhen": "behind-base-branch"
} }