18 Commits
0.4 ... 0.9

Author SHA1 Message Date
1dcddacca3 added git as a dependency of ansible galaxy 2019-10-08 21:53:22 +02:00
e82200abfc drone fmt 2019-05-25 17:45:10 +02:00
43b83e7c94 this is so ugly -.- 2019-05-25 17:41:28 +02:00
4134b9ce5f fixed missing name for debian 8 2019-05-25 17:33:57 +02:00
71600ee52c debug 2019-05-25 17:24:36 +02:00
120fd5ba1f trying new style again 2019-05-25 17:22:20 +02:00
46340b6942 added missing dependencies for arch 2019-05-25 16:25:10 +02:00
da2bf61102 mäh using old stype again...
Some checks reported errors
continuous-integration/drone/tag Build was killed
2019-05-24 18:55:30 +02:00
cc36058ab9 drone fmt 2019-05-24 18:53:21 +02:00
cc9ef207ad settings in seperated block 2019-05-24 18:50:04 +02:00
0ee743dc21 refactored pipeline 2019-05-24 18:44:07 +02:00
bdbf04cf5f concurrent builds? 2019-05-24 18:39:36 +02:00
71196252ee #2 fixed and changed drone.yml 2019-05-24 18:33:20 +02:00
51eb696e96 #1 added ubuntu 18.04 support 2019-05-24 18:06:01 +02:00
1999ac0aed version
Some checks reported errors
continuous-integration/drone/tag Build was killed
2019-03-04 00:23:22 +01:00
70f9e2f7c0 added build status
Some checks reported errors
continuous-integration/drone/tag Build was killed
2019-03-04 00:00:59 +01:00
e532742303 fixed default python interpreter for arch image
Some checks reported errors
continuous-integration/drone/tag Build was killed
2018-05-25 17:57:34 +02:00
a34a0ddcf1 changed description to match current repo
Some checks reported errors
continuous-integration/drone/tag Build was killed
2018-02-22 22:42:40 +01:00
7 changed files with 279 additions and 157 deletions

View File

@ -1,168 +1,275 @@
pipeline: ---
build-ubuntu-16: kind: pipeline
group: build name: ansible-containers
image: plugins/docker
platform:
os: linux
arch: amd64
concurrency:
limit: 9
steps:
- name: build-ubuntu-18
image: plugins/docker
settings:
dockerfile: ubuntu-18.04/Dockerfile
dry_run: true
repo: lerentis/ansible repo: lerentis/ansible
tag: ubuntu-16.04 tag: ubuntu-18.04
when:
event:
- push
- pull_request
- name: build-ubuntu-16
image: plugins/docker
settings:
dockerfile: ubuntu-16.04/Dockerfile dockerfile: ubuntu-16.04/Dockerfile
dry_run: true dry_run: true
when:
event: [ push, pull_request ]
build-ubuntu-14:
group: build
image: plugins/docker
repo: lerentis/ansible
tag: ubuntu-14.04
dockerfile: ubuntu-14.04/Dockerfile
dry_run: true
when:
event: [ push, pull_request ]
build-fedora-24:
group: build
image: plugins/docker
repo: lerentis/ansible
tag: fedora-24
dockerfile: fedora-24/Dockerfile
dry_run: true
when:
event: [ push, pull_request ]
build-alpine-3:
group: build
image: plugins/docker
repo: lerentis/ansible
tag: alpine-3
dockerfile: alpine-3/Dockerfile
dry_run: true
when:
event: [ push, pull_request ]
build-debian-8:
group: build
image: plugins/docker
repo: lerentis/ansible
tag: debian-8
dockerfile: debian-8/Dockerfile
dry_run: true
when:
event: [ push, pull_request ]
build-debian-7:
group: build
image: plugins/docker
repo: lerentis/ansible
tag: debian-7
dockerfile: debian-8/Dockerfile
dry_run: true
when:
event: [ push, pull_request ]
build-centos-7:
group: build
image: plugins/docker
repo: lerentis/ansible
tag: centos-7
dockerfile: centos-7/Dockerfile
dry_run: true
when:
event: [ push, pull_request ]
build-arch:
group: build
image: plugins/docker
repo: lerentis/ansible
tag: arch
dockerfile: arch/Dockerfile
dry_run: true
when:
event: [ push, pull_request ]
build-ubuntu-16-publish:
group: build
image: plugins/docker
repo: lerentis/ansible repo: lerentis/ansible
tag: ubuntu-16.04 tag: ubuntu-16.04
dockerfile: ubuntu-16.04/Dockerfile when:
secrets: [ docker_username, docker_password ] event:
when: - push
event: [ tag ] - pull_request
build-ubuntu-14-publish: - name: build-ubuntu-14
group: build image: plugins/docker
image: plugins/docker settings:
dockerfile: ubuntu-14.04/Dockerfile
dry_run: true
repo: lerentis/ansible repo: lerentis/ansible
tag: ubuntu-14.04 tag: ubuntu-14.04
dockerfile: ubuntu-14.04/Dockerfile when:
secrets: [ docker_username, docker_password ] event:
when: - push
event: [ tag ] - pull_request
build-fedora-24-publish: - name: build-fedora-24
group: build image: plugins/docker
image: plugins/docker settings:
dockerfile: fedora-24/Dockerfile
dry_run: true
repo: lerentis/ansible repo: lerentis/ansible
tag: fedora-24 tag: fedora-24
dockerfile: fedora-24/Dockerfile when:
secrets: [ docker_username, docker_password ] event:
when: - push
event: [ tag ] - pull_request
build-alpine-3-publish: - name: build-alpine-3
group: build image: plugins/docker
image: plugins/docker settings:
dockerfile: alpine-3/Dockerfile
dry_run: true
repo: lerentis/ansible repo: lerentis/ansible
tag: alpine-3 tag: alpine-3
dockerfile: alpine-3/Dockerfile when:
secrets: [ docker_username, docker_password ] event:
when: - push
event: [ tag ] - pull_request
build-debian-8-publish: - name: build-debian-8
group: build image: plugins/docker
image: plugins/docker settings:
dockerfile: debian-8/Dockerfile
dry_run: true
repo: lerentis/ansible repo: lerentis/ansible
tag: debian-8 tag: debian-8
dockerfile: debian-8/Dockerfile when:
secrets: [ docker_username, docker_password ] event:
when: - push
event: [ tag ] - pull_request
build-debian-7-publish: - name: build-debian-7
group: build image: plugins/docker
image: plugins/docker settings:
dockerfile: debian-8/Dockerfile
dry_run: true
repo: lerentis/ansible repo: lerentis/ansible
tag: debian-7 tag: debian-7
dockerfile: debian-8/Dockerfile when:
secrets: [ docker_username, docker_password ] event:
when: - push
event: [ tag ] - pull_request
build-centos-7-publish: - name: build-centos-7
group: build image: plugins/docker
image: plugins/docker settings:
dockerfile: centos-7/Dockerfile
dry_run: true
repo: lerentis/ansible repo: lerentis/ansible
tag: centos-7 tag: centos-7
dockerfile: centos-7/Dockerfile when:
secrets: [ docker_username, docker_password ] event:
when: - push
event: [ tag ] - pull_request
build-arch-publish: - name: build-arch
group: build image: plugins/docker
image: plugins/docker settings:
dockerfile: arch/Dockerfile
dry_run: true
repo: lerentis/ansible repo: lerentis/ansible
tag: arch tag: arch
dockerfile: arch/Dockerfile when:
secrets: [ docker_username, docker_password ] event:
when: - push
event: [ tag ] - pull_request
telegram: - name: build-ubuntu-18-publish
image: appleboy/drone-telegram image: plugins/docker
token: 335668211:AAF-YgId7iI6ANBuZVy4uVOYYqA4R4uAaqY settings:
to: 14852963 dockerfile: ubuntu-18.04/Dockerfile
message: Commit {{ commit.link }} ran with build {{ build.number }} and finished with status {{ build.status }}. password:
when: from_secret: docker_password
status: [ failure, success ] repo: lerentis/ansible
tag: ubuntu-18.04
username:
from_secret: docker_username
when:
event:
- tag
- name: build-ubuntu-16-publish
image: plugins/docker
settings:
dockerfile: ubuntu-16.04/Dockerfile
password:
from_secret: docker_password
repo: lerentis/ansible
tag: ubuntu-16.04
username:
from_secret: docker_username
when:
event:
- tag
- name: build-ubuntu-14-publish
image: plugins/docker
settings:
dockerfile: ubuntu-14.04/Dockerfile
password:
from_secret: docker_password
repo: lerentis/ansible
tag: ubuntu-14.04
username:
from_secret: docker_username
when:
event:
- tag
- name: build-fedora-24-publish
image: plugins/docker
settings:
dockerfile: fedora-24/Dockerfile
password:
from_secret: docker_password
repo: lerentis/ansible
tag: fedora-24
username:
from_secret: docker_username
when:
event:
- tag
- name: build-alpine-3-publish
image: plugins/docker
settings:
dockerfile: alpine-3/Dockerfile
password:
from_secret: docker_password
repo: lerentis/ansible
tag: alpine-3
username:
from_secret: docker_username
when:
event:
- tag
- name: build-debian-8-publish
image: plugins/docker
settings:
dockerfile: debian-8/Dockerfile
password:
from_secret: docker_password
repo: lerentis/ansible
tag: debian-8
username:
from_secret: docker_username
when:
event:
- tag
- name: build-debian-7-publish
image: plugins/docker
settings:
dockerfile: debian-8/Dockerfile
password:
from_secret: docker_password
repo: lerentis/ansible
tag: debian-7
username:
from_secret: docker_username
when:
event:
- tag
- name: build-centos-7-publish
image: plugins/docker
settings:
dockerfile: centos-7/Dockerfile
password:
from_secret: docker_password
repo: lerentis/ansible
tag: centos-7
username:
from_secret: docker_username
when:
event:
- tag
- name: build-arch-publish
image: plugins/docker
settings:
dockerfile: arch/Dockerfile
password:
from_secret: docker_password
repo: lerentis/ansible
tag: arch
username:
from_secret: docker_username
when:
event:
- tag
- 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
when:
status:
- failure
- success
depends_on:
- build-ubuntu-18
- build-ubuntu-16
- build-ubuntu-14
- build-fedora-24
- build-alpine-3
- build-debian-8
- build-debian-7
- build-centos-7
- build-arch
- build-ubuntu-18-publish
- build-ubuntu-16-publish
- build-ubuntu-14-publish
- build-fedora-24-publish
- build-alpine-3-publish
- build-debian-8-publish
- build-debian-7-publish
- build-centos-7-publish
- build-arch-publish

View File

@ -1,7 +1,9 @@
# ansible # ansible
Docker images for running and testing ansible playbooks with various operating systems. [![Build Status](https://drone.burntbunch.org/api/badges/lerentis/ansible-container/status.svg)](https://drone.burntbunch.org/lerentis/ansible-container)
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
I don't like obfuscated Dockerfiles with external scripts and hundreds of bells and whistles, so I created these simple ones. I don't like obfuscated Dockerfiles with external scripts and hundreds of bells and whistles, so I created these simple ones.
Available operating systems: Available operating systems:
@ -20,7 +22,7 @@ Available operating systems:
-v /path/to/site/:/site \ -v /path/to/site/:/site \
-v /path/to/ansible-user-ssh/:/root/.ssh:ro \ -v /path/to/ansible-user-ssh/:/root/.ssh:ro \
--tmpfs /root/.ansible \ --tmpfs /root/.ansible \
chmuul/ansible:alpine-3 \ lerentis/ansible:alpine-3 \
ansible-playbook site.yml ansible-playbook site.yml
Note: /root/.ansible must not be an overlayfs, otherwise ssh accelerate won't work. Note: /root/.ansible must not be an overlayfs, otherwise ssh accelerate won't work.
@ -29,7 +31,7 @@ Note: /root/.ansible must not be an overlayfs, otherwise ssh accelerate won't wo
pipeline: pipeline:
build: build:
image: chmuul/ansible:${OS} image: lerentis/ansible:${OS}
commands: commands:
- ansible-playbook -i tests/inventory tests/main.yml --syntax-check - ansible-playbook -i tests/inventory tests/main.yml --syntax-check
- ansible-playbook -i tests/inventory tests/main.yml - ansible-playbook -i tests/inventory tests/main.yml
@ -57,13 +59,14 @@ Note: /root/.ansible must not be an overlayfs, otherwise ssh accelerate won't wo
- docker - docker
before_install: before_install:
- docker pull chmuul/ansible:${OS} - docker pull lerentis/ansible:${OS}
script: script:
- docker run -t -w /site -v $(pwd):/site chmuul/ansible:${OS} ansible-playbook -i tests/inventory tests/main.yml --syntax-check - docker run -t -w /site -v $(pwd):/site lerentis/ansible:${OS} ansible-playbook -i tests/inventory tests/main.yml --syntax-check
- docker run -t -w /site -v $(pwd):/site chmuul/ansible:${OS} ansible-playbook -i tests/inventory tests/main.yml - docker run -t -w /site -v $(pwd):/site lerentis/ansible:${OS} ansible-playbook -i tests/inventory tests/main.yml
## references ## references
* [project on github](https://github.com/pauvos/ansible) * [project](https://git.burntbunch.org/lerentis/ansible-container)
* [project on hub.docker.com](https://hub.docker.com/r/chmuul/ansible)
Current Version: 0.7.2

View File

@ -1,11 +1,5 @@
FROM archlinux/base FROM archlinux/base
RUN echo "[archlinuxfr]" >> /etc/pacman.conf && \ RUN pacman -Syuu --noconfirm && pacman -S python2 ansible sshpass git python2-passlib python2-netaddr --noconfirm
echo "SigLevel = Never" >> /etc/pacman.conf && \
echo "Server = http://repo.archlinux.fr/x86_64" >> /etc/pacman.conf
RUN pacman -Syuu --noconfirm && pacman -S yaourt ansible sshpass python2-passlib python2-netaddr python2-pywinrm python2-dnspython python2-ovirt-engine-sdk python2-jmespath python2-requests-ntlm python2-requests-kerberos python2-requests-credssp git --noconfirm
RUN ln -s /usr/bin/python2.7 /usr/bin/python
CMD ["ansible-playbook", "--help"] CMD ["ansible-playbook", "--help"]

View File

@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
cd ubuntu-18.04 && docker build -t lerentis/ansible:ubuntu-18.04 .
cd ubuntu-16.04 && docker build -t lerentis/ansible:ubuntu-16.04 . cd ubuntu-16.04 && docker build -t lerentis/ansible:ubuntu-16.04 .
cd ../alpine-3 && docker build -t lerentis/ansible:alpine-3 . cd ../alpine-3 && docker build -t lerentis/ansible:alpine-3 .
cd ../ubuntu-14.04 && docker build -t lerentis/ansible:ubuntu-14.04 . cd ../ubuntu-14.04 && docker build -t lerentis/ansible:ubuntu-14.04 .

View File

@ -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 \ && yum -y install ansible git \
&& yum clean headers \ && yum clean headers \
&& yum clean packages && yum clean packages

View File

@ -8,6 +8,7 @@ RUN apt-get update \
&& apt-get update \ && apt-get update \
&& apt-get install -y --no-install-recommends \ && apt-get install -y --no-install-recommends \
ansible \ ansible \
git \
&& apt-get clean && apt-get clean
CMD ["ansible-playbook", "--help"] CMD ["ansible-playbook", "--help"]

16
ubuntu-18.04/Dockerfile Normal file
View File

@ -0,0 +1,16 @@
FROM ubuntu:18.04
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
software-properties-common \
apt-utils \
&& apt-add-repository ppa:ansible/ansible \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
ansible \
python-apt \
git-core \
openssh-client \
&& apt-get clean
CMD ["ansible-playbook", "--help"]