You've already forked ansible-docker
Compare commits
19 Commits
778e90fab8
...
0.1.1
Author | SHA1 | Date | |
---|---|---|---|
bd5ef263d7
|
|||
50511720eb
|
|||
395be4db9e
|
|||
8044e5941e
|
|||
2ffe90c2e4
|
|||
f09a9348d4
|
|||
ef2799d375
|
|||
9aa0361c36
|
|||
9d219ab8a8
|
|||
43abfd2cc5
|
|||
b9cf2b9d9e
|
|||
5446032c75
|
|||
a4c19c776f
|
|||
f202483847
|
|||
04700e8dc1
|
|||
ce22ec4e43
|
|||
89098ecb4d
|
|||
c6dbd46513
|
|||
4f6bcb39aa
|
298
.drone.yml
298
.drone.yml
@ -1,298 +0,0 @@
|
||||
---
|
||||
kind: pipeline
|
||||
type: kubernetes
|
||||
name: linter
|
||||
|
||||
clone:
|
||||
disable: true
|
||||
|
||||
steps:
|
||||
- name: clone
|
||||
image: git.cryptic.systems/volker.raschek/git:1.4.0
|
||||
|
||||
- name: markdown lint
|
||||
commands:
|
||||
- markdownlint *.md
|
||||
image: git.cryptic.systems/volker.raschek/markdownlint:0.43.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.4.0
|
||||
|
||||
- name: build
|
||||
image: docker.io/plugins/docker:20.18.6
|
||||
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.4.0
|
||||
|
||||
- name: build
|
||||
image: docker.io/plugins/docker:20.18.6
|
||||
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.4.0
|
||||
|
||||
- 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.4.0
|
||||
|
||||
- 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.17.0
|
||||
|
||||
- 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
|
45
.gitea/workflows/build.yaml
Normal file
45
.gitea/workflows/build.yaml
Normal 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 \
|
||||
.
|
77
.gitea/workflows/release.yaml
Normal file
77
.gitea/workflows/release.yaml
Normal 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
|
21
.gitea/workflows/update-docker-hub-description.yaml
Normal file
21
.gitea/workflows/update-docker-hub-description.yaml
Normal 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
|
@ -45,19 +45,17 @@ MD012:
|
||||
# MD013/line-length - Line length
|
||||
MD013:
|
||||
# Number of characters
|
||||
line_length: 80
|
||||
line_length: 120
|
||||
# Number of characters for headings
|
||||
heading_line_length: 80
|
||||
heading_line_length: 120
|
||||
# Number of characters for code blocks
|
||||
code_block_line_length: 80
|
||||
code_block_line_length: 120
|
||||
# Include code blocks
|
||||
code_blocks: false
|
||||
# Include tables
|
||||
tables: false
|
||||
# Include headings
|
||||
headings: true
|
||||
# Include headings
|
||||
headers: true
|
||||
# Strict length checking
|
||||
strict: false
|
||||
# Stern length checking
|
||||
|
@ -9,6 +9,8 @@ RUN pacman --sync --sysupgrade --refresh --noconfirm && \
|
||||
openssl \
|
||||
libyaml \
|
||||
python \
|
||||
python-boto3 \
|
||||
python-botocore \
|
||||
python-setuptools \
|
||||
python-pip \
|
||||
python-pytest \
|
||||
@ -31,7 +33,7 @@ RUN locale-gen en_US.UTF-8
|
||||
|
||||
# Install Ansible inventory file
|
||||
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
|
||||
# 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
|
||||
|
||||
VOLUME [ "/sys/fs/cgroup", "/tmp", "/run"]
|
||||
CMD [ "/lib/systemd/systemd" ]
|
31
Dockerfile.rockylinux8
Normal file
31
Dockerfile.rockylinux8
Normal 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"]
|
80
Makefile
80
Makefile
@ -3,41 +3,71 @@
|
||||
# container runtime. This is needed to start and run a container image.
|
||||
CONTAINER_RUNTIME?=$(shell which podman)
|
||||
|
||||
# CONTAINER_IMAGE
|
||||
# Defines the name of the new container to be built using several variables.
|
||||
BUILD_IMAGE_REGISTRY_HOST:=git.cryptic.systems
|
||||
BUILD_IMAGE_REGISTRY_USER:=volker.raschek
|
||||
BUILD_IMAGE_NAMESPACE?=${BUILD_IMAGE_REGISTRY_USER}
|
||||
BUILD_IMAGE_REPOSITORY:=ansible-archlinux
|
||||
BUILD_IMAGE_VERSION?=latest
|
||||
BUILD_IMAGE_FULLY_QUALIFIED=${BUILD_IMAGE_REGISTRY_HOST}/${BUILD_IMAGE_NAMESPACE}/${BUILD_IMAGE_REPOSITORY}:${BUILD_IMAGE_VERSION}
|
||||
BUILD_IMAGE_UNQUALIFIED=${BUILD_IMAGE_NAMESPACE}/${BUILD_IMAGE_REPOSITORY}:${BUILD_IMAGE_VERSION}
|
||||
# ArchLinux
|
||||
ANSIBLE_ARCH_IMAGE_REGISTRY_HOST?=git.cryptic.systems
|
||||
ANSIBLE_ARCH_IMAGE_REGISTRY_USER?=volker.raschek
|
||||
ANSIBLE_ARCH_IMAGE_NAMESPACE?=${ANSIBLE_ARCH_IMAGE_REGISTRY_USER}
|
||||
ANSIBLE_ARCH_IMAGE_REPOSITORY:=ansible
|
||||
ANSIBLE_ARCH_IMAGE_VERSION?=latest
|
||||
ANSIBLE_ARCH_IMAGE_VERSION_SUFFIX=arch-linux
|
||||
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 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
|
||||
container-image/build:
|
||||
PHONY:=container-image/build/arch-linux
|
||||
container-image/build/arch-linux:
|
||||
${CONTAINER_RUNTIME} build \
|
||||
--file Dockerfile \
|
||||
--file Dockerfile.archlinux \
|
||||
--no-cache \
|
||||
--pull \
|
||||
--tag ${BUILD_IMAGE_FULLY_QUALIFIED} \
|
||||
--tag ${BUILD_IMAGE_UNQUALIFIED} \
|
||||
--tag ${ANSIBLE_ARCH_IMAGE_FULLY_QUALIFIED} \
|
||||
.
|
||||
|
||||
# DELETE CONTAINER IMAGE
|
||||
# DELETE ANSIBLE ARCHLINUX CONTAINER IMAGE
|
||||
# ==============================================================================
|
||||
PHONY:=container-image/delete
|
||||
container-image/delete:
|
||||
- ${CONTAINER_RUNTIME} image rm ${BUILD_IMAGE_FULLY_QUALIFIED} ${BUILD_IMAGE_UNQUALIFIED}
|
||||
- ${CONTAINER_RUNTIME} image rm ${BASE_IMAGE_FULLY_QUALIFIED}
|
||||
PHONY:=container-image/delete/arch-linux
|
||||
container-image/delete/arch-linux:
|
||||
- ${CONTAINER_RUNTIME} image rm ${ANSIBLE_ARCH_IMAGE_FULLY_QUALIFIED}
|
||||
|
||||
# PUSH CONTAINER IMAGE
|
||||
# PUSH ANSIBLE ARCHLINUX CONTAINER IMAGE
|
||||
# ==============================================================================
|
||||
PHONY+=container-image/push
|
||||
container-image/push:
|
||||
echo ${BUILD_IMAGE_REGISTRY_PASSWORD} | ${CONTAINER_RUNTIME} login ${BUILD_IMAGE_REGISTRY_HOST} --username ${BUILD_IMAGE_REGISTRY_USER} --password-stdin
|
||||
${CONTAINER_RUNTIME} push ${BUILD_IMAGE_FULLY_QUALIFIED}
|
||||
PHONY+=container-image/push/arch-linux
|
||||
container-image/push/arch-linux:
|
||||
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}
|
||||
|
||||
# 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
|
||||
# ==============================================================================
|
||||
|
21
README.md
21
README.md
@ -1,4 +1,21 @@
|
||||
# ansible-archlinux-docker
|
||||
# ansible
|
||||
|
||||
[](https://drone.cryptic.systems/volker.raschek/ansible-archlinux-docker)
|
||||
[](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"
|
||||
```
|
||||
|
@ -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
|
@ -1,15 +1,9 @@
|
||||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"assignees": [ "volker.raschek" ],
|
||||
"labels": [ "renovate" ],
|
||||
"packageRules": [
|
||||
{
|
||||
"addLabels": [ "renovate/droneci", "renovate/automerge" ],
|
||||
"automerge": true,
|
||||
"matchManagers": "droneci",
|
||||
"matchUpdateTypes": [ "minor", "patch"]
|
||||
}
|
||||
],
|
||||
"rebaseLabel": "renovate/rebase",
|
||||
"rebaseWhen": "behind-base-branch"
|
||||
"extends": [
|
||||
"local>volker.raschek/renovate-config:default#master",
|
||||
"local>volker.raschek/renovate-config:container#master",
|
||||
"local>volker.raschek/renovate-config:actions#master",
|
||||
"local>volker.raschek/renovate-config:regexp#master"
|
||||
]
|
||||
}
|
||||
|
Reference in New Issue
Block a user