2016-08-13 11:39:36 +00:00
|
|
|
# ansible
|
2016-07-24 19:20:12 +00:00
|
|
|
|
2021-10-05 20:23:42 +00:00
|
|
|
[![Build Status](https://drone.uploadfilter24.eu/api/badges/lerentis/ansible/status.svg)](https://drone.uploadfilter24.eu/lerentis/ansible)
|
2019-03-03 23:00:59 +00:00
|
|
|
|
2016-08-14 17:03:43 +00:00
|
|
|
Docker images for running and testing ansible playbooks with various operating systems.
|
2018-02-22 21:42:40 +00:00
|
|
|
This Project is based on this [project](https://github.com/pauvos/ansible), which seems abandoned
|
2016-08-14 17:03:43 +00:00
|
|
|
I don't like obfuscated Dockerfiles with external scripts and hundreds of bells and whistles, so I created these simple ones.
|
2016-07-24 19:20:12 +00:00
|
|
|
|
2016-08-14 08:24:51 +00:00
|
|
|
Available operating systems:
|
2016-07-24 19:20:12 +00:00
|
|
|
|
2022-04-20 19:03:16 +00:00
|
|
|
* alpine-3.14
|
|
|
|
* alpine-3.15
|
2016-08-14 08:24:51 +00:00
|
|
|
* centos-7
|
2022-02-10 14:53:05 +00:00
|
|
|
* almalinux-8
|
2016-08-13 09:35:03 +00:00
|
|
|
* debian-8
|
2022-04-20 19:03:16 +00:00
|
|
|
* fedora-34
|
|
|
|
* fedora-35
|
|
|
|
* fedora-36
|
|
|
|
* fedora-37
|
2016-08-14 08:24:51 +00:00
|
|
|
* ubuntu-16.04
|
2019-10-27 20:35:29 +00:00
|
|
|
* ubuntu-18.04
|
2022-02-10 14:53:05 +00:00
|
|
|
* ubuntu-20.04
|
2022-04-20 17:31:35 +00:00
|
|
|
* ubuntu-22.04
|
2018-01-16 22:21:51 +00:00
|
|
|
* arch
|
2016-07-31 12:44:58 +00:00
|
|
|
|
2016-08-14 17:12:14 +00:00
|
|
|
## run playbooks
|
2016-07-24 19:20:12 +00:00
|
|
|
|
|
|
|
docker run -it --rm \
|
2016-08-13 09:49:19 +00:00
|
|
|
-w /site \
|
2016-07-24 19:20:12 +00:00
|
|
|
-v /path/to/site/:/site \
|
|
|
|
-v /path/to/ansible-user-ssh/:/root/.ssh:ro \
|
|
|
|
--tmpfs /root/.ansible \
|
2018-02-22 21:42:40 +00:00
|
|
|
lerentis/ansible:alpine-3 \
|
2016-07-24 19:20:12 +00:00
|
|
|
ansible-playbook site.yml
|
2016-08-12 07:25:19 +00:00
|
|
|
|
2016-08-13 09:35:03 +00:00
|
|
|
Note: /root/.ansible must not be an overlayfs, otherwise ssh accelerate won't work.
|
2016-08-12 07:32:10 +00:00
|
|
|
|
2016-08-14 17:12:14 +00:00
|
|
|
## run tests with drone.io
|
2016-08-13 12:45:55 +00:00
|
|
|
|
2018-01-16 21:58:42 +00:00
|
|
|
pipeline:
|
|
|
|
build:
|
2018-02-22 21:42:40 +00:00
|
|
|
image: lerentis/ansible:${OS}
|
2018-01-16 21:58:42 +00:00
|
|
|
commands:
|
|
|
|
- ansible-playbook -i tests/inventory tests/main.yml --syntax-check
|
|
|
|
- ansible-playbook -i tests/inventory tests/main.yml
|
2016-08-13 12:45:55 +00:00
|
|
|
|
|
|
|
matrix:
|
|
|
|
OS:
|
2016-08-14 17:03:43 +00:00
|
|
|
- centos-7
|
2016-08-13 12:45:55 +00:00
|
|
|
- debian-8
|
2016-08-14 17:03:43 +00:00
|
|
|
- fedora-24
|
|
|
|
- ubuntu-16.04
|
2018-01-16 22:21:51 +00:00
|
|
|
- arch
|
2016-08-13 12:45:55 +00:00
|
|
|
|
2016-08-14 17:12:14 +00:00
|
|
|
## run tests with travis-ci
|
|
|
|
|
|
|
|
sudo: required
|
|
|
|
|
|
|
|
env:
|
|
|
|
- OS: centos-7
|
|
|
|
- OS: debian-8
|
|
|
|
- OS: fedora-24
|
|
|
|
- OS: ubuntu-16.04
|
2018-01-16 22:21:51 +00:00
|
|
|
- OS: arch
|
2016-08-14 17:12:14 +00:00
|
|
|
|
|
|
|
services:
|
|
|
|
- docker
|
|
|
|
|
|
|
|
before_install:
|
2018-02-22 21:42:40 +00:00
|
|
|
- docker pull lerentis/ansible:${OS}
|
2016-08-14 17:12:14 +00:00
|
|
|
|
|
|
|
script:
|
2018-02-22 21:42:40 +00:00
|
|
|
- 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 lerentis/ansible:${OS} ansible-playbook -i tests/inventory tests/main.yml
|
2016-08-14 17:12:14 +00:00
|
|
|
|
2016-08-13 10:13:28 +00:00
|
|
|
## references
|
2016-08-12 07:25:19 +00:00
|
|
|
|
2022-02-10 14:53:05 +00:00
|
|
|
* [project](https://git.uploadfilter24.eu/lerentis/ansible)
|
2019-03-03 23:23:22 +00:00
|
|
|
|
2022-04-20 18:21:39 +00:00
|
|
|
Current Version: 2.0
|