Compare commits
45 Commits
Author | SHA1 | Date | |
---|---|---|---|
cce376cc4b | |||
f719b7ade3 | |||
66b678830e | |||
641bd93f93 | |||
9c948d5788 | |||
f15e77fb88 | |||
12fe4cf41a | |||
39c7266b49 | |||
e854da83ca | |||
61bcffed6a | |||
d07b70a09f | |||
d6a66a4e8f | |||
d661d20093 | |||
da6b0189ce | |||
fb3a10a4d3 | |||
9245bc02a6 | |||
974e29e405 | |||
5c06f04f69 | |||
c2252c72f0 | |||
6bf134506d | |||
8bafe97a18 | |||
3728e4d4d2 | |||
d4b71fcddc | |||
29a5ac9221 | |||
f6128fe7cf | |||
223a3ae308 | |||
15a8a45e2b | |||
ce806504b2 | |||
3c8c7ff231 | |||
1b737ed6c0 | |||
3c86f057c2 | |||
f32f612663 | |||
6a70e27815 | |||
7f0b1a8120 | |||
791befff92 | |||
dcfb812e91 | |||
ab09084d29 | |||
15eb28ebc7 | |||
b83d7d1d80 | |||
6f197f959a | |||
157146ffb8 | |||
1ff195e546 | |||
35c80963b3 | |||
43623da900 | |||
74ced09e91 |
55
.drone.star
Normal file
55
.drone.star
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
|
||||||
|
def main(ctx):
|
||||||
|
return [
|
||||||
|
pipeline("debian", ["ubuntu-22.04", "ubuntu-20.04"]),
|
||||||
|
pipeline("rhel", ["fedora-34", "fedora-35"]),
|
||||||
|
]
|
||||||
|
|
||||||
|
def generateStep(tag):
|
||||||
|
return {
|
||||||
|
"name": "build-" + tag,
|
||||||
|
"image": "plugins/kaniko",
|
||||||
|
"settings": {
|
||||||
|
"dockerfile": tag + "/Dockerfile",
|
||||||
|
"password": {
|
||||||
|
"from_secret": "docker_password"
|
||||||
|
},
|
||||||
|
"username": {
|
||||||
|
"from_secret": "docker_username"
|
||||||
|
},
|
||||||
|
"repo": "lerentis/ansible",
|
||||||
|
"tags": [
|
||||||
|
tag
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"when": {
|
||||||
|
"event": [
|
||||||
|
"push",
|
||||||
|
"pull_request",
|
||||||
|
"cron"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"ressources": {
|
||||||
|
"limits": {
|
||||||
|
"cpu": "200",
|
||||||
|
"memory": "1024MiB"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
def pipeline(group, tags):
|
||||||
|
steps = []
|
||||||
|
for tag in tags:
|
||||||
|
steps += generateStep(tag)
|
||||||
|
print(generateStep(tag))
|
||||||
|
print(steps)
|
||||||
|
return {
|
||||||
|
"kind": "pipeline",
|
||||||
|
"type": "kubernetes",
|
||||||
|
"name": "build-%s" % group,
|
||||||
|
"platform": {
|
||||||
|
"os": "linux",
|
||||||
|
"arch": "amd64"
|
||||||
|
},
|
||||||
|
"steps": steps
|
||||||
|
}
|
947
.drone.yml
947
.drone.yml
File diff suppressed because it is too large
Load Diff
18
README.md
18
README.md
@ -1,6 +1,6 @@
|
|||||||
# ansible
|
# ansible
|
||||||
|
|
||||||
[![Build Status](https://drone.burntbunch.org/api/badges/lerentis/ansible-container/status.svg)](https://drone.burntbunch.org/lerentis/ansible-container)
|
[![Build Status](https://drone.uploadfilter24.eu/api/badges/lerentis/ansible/status.svg)](https://drone.uploadfilter24.eu/lerentis/ansible)
|
||||||
|
|
||||||
Docker images for running and testing ansible playbooks with various operating systems.
|
Docker images for running and testing ansible playbooks with various operating systems.
|
||||||
This Project is based on this [project](https://github.com/pauvos/ansible), which seems abandoned
|
This Project is based on this [project](https://github.com/pauvos/ansible), which seems abandoned
|
||||||
@ -8,13 +8,19 @@ I don't like obfuscated Dockerfiles with external scripts and hundreds of bells
|
|||||||
|
|
||||||
Available operating systems:
|
Available operating systems:
|
||||||
|
|
||||||
* alpine-3
|
* alpine-3.14
|
||||||
|
* alpine-3.15
|
||||||
* centos-7
|
* centos-7
|
||||||
|
* almalinux-8
|
||||||
* debian-8
|
* debian-8
|
||||||
* fedora-24
|
* fedora-34
|
||||||
|
* fedora-35
|
||||||
|
* fedora-36
|
||||||
|
* fedora-37
|
||||||
* ubuntu-16.04
|
* ubuntu-16.04
|
||||||
* ubuntu-18.04
|
* ubuntu-18.04
|
||||||
* ubuntu-19.04
|
* ubuntu-20.04
|
||||||
|
* ubuntu-22.04
|
||||||
* arch
|
* arch
|
||||||
|
|
||||||
## run playbooks
|
## run playbooks
|
||||||
@ -69,6 +75,6 @@ Note: /root/.ansible must not be an overlayfs, otherwise ssh accelerate won't wo
|
|||||||
|
|
||||||
## references
|
## references
|
||||||
|
|
||||||
* [project](https://git.burntbunch.org/lerentis/ansible-container)
|
* [project](https://git.uploadfilter24.eu/lerentis/ansible)
|
||||||
|
|
||||||
Current Version: 0.7.2
|
Current Version: 2.0
|
||||||
|
10
almalinux-8/Dockerfile
Normal file
10
almalinux-8/Dockerfile
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
FROM almalinux:8
|
||||||
|
|
||||||
|
RUN dnf -y install python3-pip epel-release \
|
||||||
|
&& dnf install -y ansible curl \
|
||||||
|
&& curl -L https://github.com/aelsabbahy/goss/releases/latest/download/goss-linux-amd64 -o /usr/local/bin/goss \
|
||||||
|
&& chmod +rx /usr/local/bin/goss \
|
||||||
|
&& touch ~/.netrc && chmod og-rw ~/.netrc \
|
||||||
|
&& pip3 install firewall
|
||||||
|
|
||||||
|
CMD ["ansible-playbook", "--help"]
|
@ -1,4 +1,4 @@
|
|||||||
FROM alpine:3.10
|
FROM alpine:3.14
|
||||||
|
|
||||||
RUN apk add --no-cache ansible curl \
|
RUN apk add --no-cache ansible curl \
|
||||||
&& curl -L https://github.com/aelsabbahy/goss/releases/latest/download/goss-linux-amd64 -o /usr/local/bin/goss \
|
&& curl -L https://github.com/aelsabbahy/goss/releases/latest/download/goss-linux-amd64 -o /usr/local/bin/goss \
|
7
alpine-3.15/Dockerfile
Normal file
7
alpine-3.15/Dockerfile
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
FROM alpine:3.15
|
||||||
|
|
||||||
|
RUN apk add --no-cache ansible curl \
|
||||||
|
&& curl -L https://github.com/aelsabbahy/goss/releases/latest/download/goss-linux-amd64 -o /usr/local/bin/goss \
|
||||||
|
&& chmod +rx /usr/local/bin/goss
|
||||||
|
|
||||||
|
CMD ["ansible-playbook", "--help"]
|
@ -1,6 +1,6 @@
|
|||||||
FROM archlinux/base
|
FROM archlinux:latest
|
||||||
|
|
||||||
RUN pacman -Syuu --noconfirm && pacman -S python ansible sshpass git python-passlib python-netaddr curl --noconfirm \
|
RUN pacman -Syuu --noconfirm && pacman -S python python2 ansible sshpass git python-passlib python-netaddr curl --noconfirm \
|
||||||
&& curl -L https://github.com/aelsabbahy/goss/releases/latest/download/goss-linux-amd64 -o /usr/local/bin/goss \
|
&& curl -L https://github.com/aelsabbahy/goss/releases/latest/download/goss-linux-amd64 -o /usr/local/bin/goss \
|
||||||
&& chmod +rx /usr/local/bin/goss
|
&& chmod +rx /usr/local/bin/goss
|
||||||
|
|
||||||
|
25
build-all.sh
25
build-all.sh
@ -1,10 +1,17 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
cd ubuntu-18.04 && docker buildx build -t lerentis/ansible:ubuntu-18.04 --platform=linux/arm,linux/arm64,linux/amd64 . --push
|
cd ubuntu-18.04 && docker buildx build -t lerentis/ansible:ubuntu-18.04-dev --platform=linux/arm,linux/arm64,linux/amd64 . --push
|
||||||
cd ../ubuntu-16.04 && docker buildx build -t lerentis/ansible:ubuntu-16.04 --platform=linux/arm,linux/arm64,linux/amd64 . --push
|
cd ../ubuntu-16.04 && docker buildx build -t lerentis/ansible:ubuntu-16.04-dev --platform=linux/arm,linux/arm64,linux/amd64 . --push
|
||||||
cd ../alpine-3 && docker buildx build -t lerentis/ansible:alpine-3 --platform=linux/arm,linux/arm64,linux/amd64 . --push
|
cd ../alpine-3.14 && docker buildx build -t lerentis/ansible:alpine-3.14-dev --platform=linux/arm,linux/arm64,linux/amd64 . --push
|
||||||
cd ../ubuntu-14.04 && docker buildx build -t lerentis/ansible:ubuntu-14.04 --platform=linux/arm,linux/arm64,linux/amd64 . --push
|
cd ../alpine-3.15 && docker buildx build -t lerentis/ansible:alpine-3.15-dev --platform=linux/arm,linux/arm64,linux/amd64 . --push
|
||||||
cd ../fedora-24 && docker buildx build -t lerentis/ansible:fedora-24 --platform=linux/arm,linux/arm64,linux/amd64 . --push
|
cd ../ubuntu-20.04 && docker buildx build -t lerentis/ansible:ubuntu-20.04-dev --platform=linux/arm,linux/arm64,linux/amd64 . --push
|
||||||
cd ../debian-8 && docker buildx build -t lerentis/ansible:debian-8 --platform=linux/arm,linux/amd64 . --push
|
cd ../ubuntu-22.04 && docker buildx build -t lerentis/ansible:ubuntu-22.04-dev --platform=linux/arm,linux/arm64,linux/amd64 . --push
|
||||||
cd ../debian-7 && docker buildx build -t lerentis/ansible:debian-7 --platform=linux/arm,linux/amd64 . --push
|
cd ../fedora-34 && docker buildx build -t lerentis/ansible:fedora-34-dev --platform=linux/amd64 . --push
|
||||||
cd ../centos-7 && docker buildx build -t lerentis/ansible:centos-7 --platform=linux/arm,linux/arm64,linux/amd64 . --push
|
cd ../fedora-35 && docker buildx build -t lerentis/ansible:fedora-35-dev --platform=linux/amd64 . --push
|
||||||
cd ../arch && docker buildx build -t lerentis/ansible:arch --platform=linux/arm,linux/arm64,linux/amd64 . --push
|
cd ../fedora-36 && docker buildx build -t lerentis/ansible:fedora-36-dev --platform=linux/amd64 . --push
|
||||||
|
cd ../fedora-37 && docker buildx build -t lerentis/ansible:fedora-37-dev --platform=linux/amd64 . --push
|
||||||
|
cd ../debian-9 && docker buildx build -t lerentis/ansible:debian-9-dev --platform=linux/arm,linux/amd64 . --push
|
||||||
|
cd ../debian-8 && docker buildx build -t lerentis/ansible:debian-8-dev --platform=linux/arm,linux/amd64 . --push
|
||||||
|
cd ../debian-10 && docker buildx build -t lerentis/ansible:debian-10-dev --platform=linux/arm64,linux/amd64 . --push
|
||||||
|
cd ../centos-7 && docker buildx build -t lerentis/ansible:centos-7-dev --platform=linux/arm64,linux/amd64 . --push
|
||||||
|
cd ../almalinux-8 && docker buildx build -t lerentis/ansible:almalinux-8-dev --platform=linux/arm64,linux/amd64 . --push
|
||||||
|
cd ../arch && docker buildx build -t lerentis/ansible:arch-dev --platform=linux/arm,linux/amd64 . --push
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
FROM centos:7
|
FROM centos:7
|
||||||
|
|
||||||
RUN yum -y install epel-release \
|
RUN yum -y install epel-release \
|
||||||
&& yum -y install ansible git curl \
|
&& yum -y install ansible git curl python-firewall \
|
||||||
&& curl -L https://github.com/aelsabbahy/goss/releases/latest/download/goss-linux-amd64 -o /usr/local/bin/goss \
|
&& curl -L https://github.com/aelsabbahy/goss/releases/latest/download/goss-linux-amd64 -o /usr/local/bin/goss \
|
||||||
&& chmod +rx /usr/local/bin/goss \
|
&& chmod +rx /usr/local/bin/goss \
|
||||||
&& yum clean headers \
|
&& yum clean headers \
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
FROM centos:8
|
|
||||||
|
|
||||||
RUN dnf -y install python3-pip &&\
|
|
||||||
dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm &&\
|
|
||||||
dnf install -y --enablerepo epel-playground ansible curl \
|
|
||||||
&& curl -L https://github.com/aelsabbahy/goss/releases/latest/download/goss-linux-amd64 -o /usr/local/bin/goss \
|
|
||||||
&& chmod +rx /usr/local/bin/goss
|
|
||||||
|
|
||||||
CMD ["ansible-playbook", "--help"]
|
|
@ -12,6 +12,8 @@ RUN apt-get -q update \
|
|||||||
apt-utils \
|
apt-utils \
|
||||||
curl \
|
curl \
|
||||||
ansible \
|
ansible \
|
||||||
|
python \
|
||||||
|
ca-certificates \
|
||||||
&& curl -L https://github.com/aelsabbahy/goss/releases/latest/download/goss-linux-amd64 -o /usr/local/bin/goss \
|
&& curl -L https://github.com/aelsabbahy/goss/releases/latest/download/goss-linux-amd64 -o /usr/local/bin/goss \
|
||||||
&& chmod +rx /usr/local/bin/goss \
|
&& chmod +rx /usr/local/bin/goss \
|
||||||
&& apt-get clean
|
&& apt-get clean
|
||||||
|
@ -11,9 +11,16 @@ RUN apt-get -q update \
|
|||||||
git \
|
git \
|
||||||
apt-utils \
|
apt-utils \
|
||||||
curl \
|
curl \
|
||||||
ansible \
|
gnupg \
|
||||||
|
dirmngr \
|
||||||
&& curl -L https://github.com/aelsabbahy/goss/releases/latest/download/goss-linux-amd64 -o /usr/local/bin/goss \
|
&& curl -L https://github.com/aelsabbahy/goss/releases/latest/download/goss-linux-amd64 -o /usr/local/bin/goss \
|
||||||
&& chmod +rx /usr/local/bin/goss \
|
&& chmod +rx /usr/local/bin/goss \
|
||||||
|
&& pip3 install --upgrade pip
|
||||||
|
|
||||||
|
RUN echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main" >> /etc/apt/sources \
|
||||||
|
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367 \
|
||||||
|
&& apt-get -q update \
|
||||||
|
&& apt-get install -yq ansible \
|
||||||
&& apt-get clean
|
&& apt-get clean
|
||||||
|
|
||||||
CMD ["ansible-playbook", "--help"]
|
CMD ["ansible-playbook", "--help"]
|
||||||
|
@ -11,11 +11,16 @@ RUN apt-get -q update \
|
|||||||
git \
|
git \
|
||||||
apt-utils \
|
apt-utils \
|
||||||
curl \
|
curl \
|
||||||
ansible \
|
gnupg \
|
||||||
|
dirmngr \
|
||||||
&& curl -L https://github.com/aelsabbahy/goss/releases/latest/download/goss-linux-amd64 -o /usr/local/bin/goss \
|
&& curl -L https://github.com/aelsabbahy/goss/releases/latest/download/goss-linux-amd64 -o /usr/local/bin/goss \
|
||||||
&& chmod +rx /usr/local/bin/goss \
|
&& chmod +rx /usr/local/bin/goss \
|
||||||
&& apt-get clean \
|
|
||||||
&& pip3 install --upgrade pip
|
&& pip3 install --upgrade pip
|
||||||
|
|
||||||
|
RUN echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main" >> /etc/apt/sources \
|
||||||
|
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367 \
|
||||||
|
&& apt-get -q update \
|
||||||
|
&& apt-get install -yq ansible \
|
||||||
|
&& apt-get clean
|
||||||
|
|
||||||
CMD ["ansible-playbook", "--help"]
|
CMD ["ansible-playbook", "--help"]
|
||||||
|
123
drone.yaml.j2
Normal file
123
drone.yaml.j2
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
{%- for pipeline in pipelines -%}
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: kubernetes
|
||||||
|
name: build-{{ pipeline.group }}
|
||||||
|
|
||||||
|
platform:
|
||||||
|
os: linux
|
||||||
|
arch: amd64
|
||||||
|
|
||||||
|
steps:
|
||||||
|
{% for tag in pipeline.tags %}
|
||||||
|
- name: build-{{ tag }}
|
||||||
|
image: plugins/kaniko
|
||||||
|
settings:
|
||||||
|
dockerfile: {{ tag }}/Dockerfile
|
||||||
|
password:
|
||||||
|
from_secret: docker_password
|
||||||
|
username:
|
||||||
|
from_secret: docker_username
|
||||||
|
repo: lerentis/ansible
|
||||||
|
tags:
|
||||||
|
- {{ tag }}-dev
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
- pull_request
|
||||||
|
- cron
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 200
|
||||||
|
memory: 1024MiB
|
||||||
|
{% endfor %}
|
||||||
|
{% endfor %}
|
||||||
|
{% for pipeline in pipelines %}
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: kubernetes
|
||||||
|
name: release-{{ pipeline.group }}
|
||||||
|
|
||||||
|
platform:
|
||||||
|
os: linux
|
||||||
|
arch: amd64
|
||||||
|
|
||||||
|
steps:
|
||||||
|
{% for tag in pipeline.tags %}
|
||||||
|
- name: release-{{ tag }}
|
||||||
|
image: plugins/kaniko
|
||||||
|
settings:
|
||||||
|
dockerfile: {{ tag }}/Dockerfile
|
||||||
|
password:
|
||||||
|
from_secret: docker_password
|
||||||
|
username:
|
||||||
|
from_secret: docker_username
|
||||||
|
repo: lerentis/ansible
|
||||||
|
tags:
|
||||||
|
- {{ tag }}
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
- tag
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 200
|
||||||
|
memory: 1024MiB
|
||||||
|
{% endfor %}
|
||||||
|
{% endfor %}
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: kubernetes
|
||||||
|
name: notify-build
|
||||||
|
|
||||||
|
platform:
|
||||||
|
os: linux
|
||||||
|
arch: amd64
|
||||||
|
|
||||||
|
steps:
|
||||||
|
{% raw %}
|
||||||
|
- name: notify
|
||||||
|
image: appleboy/drone-telegram
|
||||||
|
settings:
|
||||||
|
message: "Commit {{ commit.message }} ran with build {{ build.number }} and finished with status {{ build.status }}."
|
||||||
|
to:
|
||||||
|
from_secret: telegram_userid
|
||||||
|
token:
|
||||||
|
from_secret: telegram_secret
|
||||||
|
when:
|
||||||
|
status:
|
||||||
|
- failure
|
||||||
|
- success
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
- pull_request
|
||||||
|
- cron{% endraw %}
|
||||||
|
depends_on: {% for pipeline in pipelines %}
|
||||||
|
- build-{{ pipeline.group }} {% endfor %}
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: kubernetes
|
||||||
|
name: notify-release
|
||||||
|
|
||||||
|
platform:
|
||||||
|
os: linux
|
||||||
|
arch: amd64
|
||||||
|
|
||||||
|
steps:
|
||||||
|
{% raw %}
|
||||||
|
- name: notify
|
||||||
|
image: appleboy/drone-telegram
|
||||||
|
settings:
|
||||||
|
message: "Release {{ build.tag }} ran with build {{ build.number }} and finished with status {{ build.status }}."
|
||||||
|
to:
|
||||||
|
from_secret: telegram_userid
|
||||||
|
token:
|
||||||
|
from_secret: telegram_secret
|
||||||
|
when:
|
||||||
|
status:
|
||||||
|
- failure
|
||||||
|
- success
|
||||||
|
event:
|
||||||
|
- tag {% endraw %}
|
||||||
|
depends_on:{% for pipeline in pipelines %}
|
||||||
|
- release-{{ pipeline.group }} {% endfor %}
|
@ -1,4 +1,4 @@
|
|||||||
FROM fedora:24
|
FROM fedora:34
|
||||||
|
|
||||||
RUN dnf -y install \
|
RUN dnf -y install \
|
||||||
ansible \
|
ansible \
|
11
fedora-35/Dockerfile
Normal file
11
fedora-35/Dockerfile
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
FROM fedora:35
|
||||||
|
|
||||||
|
RUN dnf -y install \
|
||||||
|
ansible \
|
||||||
|
openssh-clients \
|
||||||
|
curl \
|
||||||
|
&& curl -L https://github.com/aelsabbahy/goss/releases/latest/download/goss-linux-amd64 -o /usr/local/bin/goss \
|
||||||
|
&& chmod +rx /usr/local/bin/goss \
|
||||||
|
&& dnf clean all
|
||||||
|
|
||||||
|
CMD ["ansible-playbook", "--help"]
|
11
fedora-36/Dockerfile
Normal file
11
fedora-36/Dockerfile
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
FROM fedora:36
|
||||||
|
|
||||||
|
RUN dnf -y install \
|
||||||
|
ansible \
|
||||||
|
openssh-clients \
|
||||||
|
curl \
|
||||||
|
&& curl -L https://github.com/aelsabbahy/goss/releases/latest/download/goss-linux-amd64 -o /usr/local/bin/goss \
|
||||||
|
&& chmod +rx /usr/local/bin/goss \
|
||||||
|
&& dnf clean all
|
||||||
|
|
||||||
|
CMD ["ansible-playbook", "--help"]
|
11
fedora-37/Dockerfile
Normal file
11
fedora-37/Dockerfile
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
FROM fedora:37
|
||||||
|
|
||||||
|
RUN dnf -y install \
|
||||||
|
ansible \
|
||||||
|
openssh-clients \
|
||||||
|
curl \
|
||||||
|
&& curl -L https://github.com/aelsabbahy/goss/releases/latest/download/goss-linux-amd64 -o /usr/local/bin/goss \
|
||||||
|
&& chmod +rx /usr/local/bin/goss \
|
||||||
|
&& dnf clean all
|
||||||
|
|
||||||
|
CMD ["ansible-playbook", "--help"]
|
52
generate-pipeline.py
Normal file
52
generate-pipeline.py
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
from jinja2 import Template, Environment, FileSystemLoader
|
||||||
|
|
||||||
|
pipelines = [
|
||||||
|
{
|
||||||
|
"group": "debian",
|
||||||
|
"tags": [
|
||||||
|
"ubuntu-22.04",
|
||||||
|
"ubuntu-20.04",
|
||||||
|
"ubuntu-18.04",
|
||||||
|
"ubuntu-16.04",
|
||||||
|
"ubuntu-14.04",
|
||||||
|
"debian-8",
|
||||||
|
"debian-9",
|
||||||
|
"debian-10"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"group": "rhel",
|
||||||
|
"tags": [
|
||||||
|
"almalinux-8",
|
||||||
|
"centos-7",
|
||||||
|
"fedora-34",
|
||||||
|
"fedora-35",
|
||||||
|
"fedora-36",
|
||||||
|
"fedora-37"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"group": "alpine",
|
||||||
|
"tags": [
|
||||||
|
"alpine-3.14",
|
||||||
|
"alpine-3.15"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"group": "arch",
|
||||||
|
"tags": [
|
||||||
|
"arch"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
file_loader = FileSystemLoader('.')
|
||||||
|
env = Environment(loader=file_loader)
|
||||||
|
|
||||||
|
template = env.get_template('drone.yaml.j2')
|
||||||
|
|
||||||
|
output = template.render(pipelines=pipelines)
|
||||||
|
print(output)
|
16
ubuntu-22.04/Dockerfile
Normal file
16
ubuntu-22.04/Dockerfile
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
FROM ubuntu:22.04
|
||||||
|
|
||||||
|
RUN apt-get update \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||||
|
software-properties-common \
|
||||||
|
apt-utils \
|
||||||
|
ansible \
|
||||||
|
python3-apt \
|
||||||
|
git-core \
|
||||||
|
openssh-client \
|
||||||
|
curl \
|
||||||
|
&& curl -L https://github.com/aelsabbahy/goss/releases/latest/download/goss-linux-amd64 -o /usr/local/bin/goss \
|
||||||
|
&& chmod +rx /usr/local/bin/goss \
|
||||||
|
&& apt-get clean
|
||||||
|
|
||||||
|
CMD ["ansible-playbook", "--help"]
|
Loading…
Reference in New Issue
Block a user