12 Commits
1.4 ... 1.5

5 changed files with 177 additions and 21 deletions

44
.drone.jsonnet Normal file

@ -0,0 +1,44 @@
local Pipeline(tag) = {
kind: "pipeline",
type: "kubernetes",
name: tag + "build",
platform: {
os: "linux",
arch: "amd64",
},
steps: [
{
name: tag,
image: "plugins/kaniko",
settings: {
repo: "lerentis/ansible",
username: { "from_secret": "docker_username" },
password: { "from_secret": "docker_password" },
dockerfile: tag + "/Dockerfile",
tags: [ tag ],
},
resources: {
limits: {
cpu: "200",
memory: "1024MiB",
},
},
when: [ "push", "pull_request", "cron" ]
}
]
};
[
Pipeline("ubuntu-20.04"),
Pipeline("ubuntu-18.04"),
Pipeline("ubuntu-14.04"),
Pipeline("debian-8"),
Pipeline("debian-9"),
Pipeline("debian-10"),
Pipeline("centos-7"),
Pipeline("almalinux-8"),
Pipeline("fedora-24"),
Pipeline("alpine-3"),
Pipeline("arch"),
]

@ -24,6 +24,11 @@ steps:
event:
- push
- pull_request
- cron
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-ubuntu-18
image: plugins/kaniko
@ -40,6 +45,11 @@ steps:
event:
- push
- pull_request
- cron
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-ubuntu-16
image: plugins/kaniko
@ -56,6 +66,11 @@ steps:
event:
- push
- pull_request
- cron
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-ubuntu-14
image: plugins/kaniko
@ -72,6 +87,11 @@ steps:
event:
- push
- pull_request
- cron
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-debian-8
image: plugins/kaniko
@ -88,6 +108,11 @@ steps:
event:
- push
- pull_request
- cron
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-debian-9
image: plugins/kaniko
@ -104,6 +129,11 @@ steps:
event:
- push
- pull_request
- cron
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-debian-10
image: plugins/kaniko
@ -120,6 +150,11 @@ steps:
event:
- push
- pull_request
- cron
resources:
limits:
cpu: 200
memory: 1024MiB
---
kind: pipeline
@ -147,22 +182,32 @@ steps:
event:
- push
- pull_request
- cron
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-centos-8
- name: build-almalinux-8
image: plugins/kaniko
settings:
dockerfile: centos-8/Dockerfile
dockerfile: almalinux-8/Dockerfile
password:
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags:
- centos-8-dev
- almalinux-8-dev
when:
event:
- push
- pull_request
- cron
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-centos-7
image: plugins/kaniko
@ -179,6 +224,11 @@ steps:
event:
- push
- pull_request
- cron
resources:
limits:
cpu: 200
memory: 1024MiB
---
kind: pipeline
@ -206,6 +256,11 @@ steps:
event:
- push
- pull_request
- cron
resources:
limits:
cpu: 200
memory: 1024MiB
---
kind: pipeline
@ -233,6 +288,11 @@ steps:
event:
- push
- pull_request
- cron
resources:
limits:
cpu: 200
memory: 1024MiB
---
kind: pipeline
@ -259,6 +319,10 @@ steps:
when:
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-ubuntu-18-release
image: plugins/kaniko
@ -274,6 +338,10 @@ steps:
when:
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-ubuntu-16-release
image: plugins/kaniko
@ -289,6 +357,10 @@ steps:
when:
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-ubuntu-14-release
image: plugins/kaniko
@ -304,6 +376,10 @@ steps:
when:
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-debian-8-release
image: plugins/kaniko
@ -319,6 +395,10 @@ steps:
when:
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-debian-9-release
image: plugins/kaniko
@ -334,6 +414,10 @@ steps:
when:
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-debian-10-release
image: plugins/kaniko
@ -349,6 +433,10 @@ steps:
when:
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
---
kind: pipeline
@ -375,21 +463,29 @@ steps:
when:
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-centos-8-release
- name: build-almalinux-8-release
image: plugins/kaniko
settings:
dockerfile: centos-8/Dockerfile
dockerfile: almalinux-8/Dockerfile
password:
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags:
- centos-8
- almalinux-8
when:
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-centos-7-release
image: plugins/kaniko
@ -405,6 +501,10 @@ steps:
when:
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
---
kind: pipeline
@ -431,6 +531,10 @@ steps:
when:
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
---
kind: pipeline
@ -457,7 +561,10 @@ steps:
when:
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
---
kind: pipeline
@ -473,9 +580,11 @@ steps:
- name: notify
image: appleboy/drone-telegram
settings:
message: "Commit {{ commit.link }} ran with build {{ build.number }} and finished with status {{ build.status }}."
to: 14852963
token: 335668211:AAF-YgId7iI6ANBuZVy4uVOYYqA4R4uAaqY
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
@ -483,6 +592,7 @@ steps:
event:
- push
- pull_request
- cron
depends_on:
- build-arch
- build-alpine
@ -503,9 +613,11 @@ steps:
- name: notify
image: appleboy/drone-telegram
settings:
message: "Commit {{ commit.link }} ran with build {{ build.number }} and finished with status {{ build.status }}."
to: 14852963
token: 335668211:AAF-YgId7iI6ANBuZVy4uVOYYqA4R4uAaqY
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

@ -1,6 +1,6 @@
# 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.
This Project is based on this [project](https://github.com/pauvos/ansible), which seems abandoned
@ -10,11 +10,12 @@ Available operating systems:
* alpine-3
* centos-7
* almalinux-8
* debian-8
* fedora-24
* ubuntu-16.04
* ubuntu-18.04
* ubuntu-19.04
* ubuntu-20.04
* arch
## run playbooks
@ -69,6 +70,6 @@ Note: /root/.ansible must not be an overlayfs, otherwise ssh accelerate won't wo
## references
* [project](https://git.burntbunch.org/lerentis/ansible-container)
* [project](https://git.uploadfilter24.eu/lerentis/ansible)
Current Version: 0.7.2

@ -1,8 +1,7 @@
FROM centos:8
FROM almalinux: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 \
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 \

@ -8,5 +8,5 @@ cd ../debian-9 && docker buildx build -t lerentis/ansible:debian-9 --platform=li
cd ../debian-8 && docker buildx build -t lerentis/ansible:debian-8 --platform=linux/arm,linux/amd64 . --push
cd ../debian-10 && docker buildx build -t lerentis/ansible:debian-10 --platform=linux/arm64,linux/amd64 . --push
cd ../centos-7 && docker buildx build -t lerentis/ansible:centos-7 --platform=linux/arm64,linux/amd64 . --push
cd ../centos-8 && docker buildx build -t lerentis/ansible:centos-8 --platform=linux/arm64,linux/amd64 . --push
cd ../almalinux-8 && docker buildx build -t lerentis/ansible:almalinux-8 --platform=linux/arm64,linux/amd64 . --push
cd ../arch && docker buildx build -t lerentis/ansible:arch --platform=linux/arm,linux/amd64 . --push