Ansible Roles
These Ansible roles are simple in style and work well together on many distributions and many Ansible version.
Unit tests
A monthly test to see of the role still works on the current distributions. Some roles contain a version that requires frequent changes and tests. To better understand what distributions and their versions are tested, have a look at the relations page.
Dependencies
Most roles have a “soft dependency” described in requirements.yml
. You can choose to use those roles if you like them. Here is an overview of these soft dependencies.
The dependencies are soft for these reasons:
- Better re-usability.
- Easier to fork.
- Let system developer assume a start-state of a machine.
Because these dependencies are loose, you have to include them in your playbook yourself:
- name: make the best machine ever
hosts: all
become: yes
roles:
- role: buluma.bootstrap
- role: buluma.java
- role: buluma.tomcat
Some roles have a hard dependencies on another role, mainly for a shared handler or variables set in the parent role, used in the child role. More details on how to use these roles. These hard dependencies are describe in meta/main.yml
under dependencies
.
Role | Depends on | Reason |
---|---|---|
ca | httpd | inherited variable |
common | reboot | A reboot is used in tasks/main.yml with include_role . |
openvpn | selinux | SELinux is configured in tasks/main.yml with include_role . |
openvpn | ca | OpenSSL keys are created in tasks/main.yml with include_role . |
php | httpd | handler |
phpmyadmin | httpd | handler |
roundcubemail | httpd | handler |
selinux | reboot | A reboot is used in tasks/main.yml with include_role . |
spamassassin | rsyslog | handler |
tftpd | xinetd | handler |
update | reboot | A reboot is used in tasks/main.yml with include_role . |
zabbix | httpd | handler & inherited variable |
A page describing how I release considering these dependencies.
Component builds
Ansible tests are being executed using the following components
Operating specific containers
Ansible collections
Collection | Function |
---|---|
roles | All roles from buluma.github.io |
Github Actions
Other tools
I use a few tools to maintain the software I create.
Tool | Usage |
---|---|
ansible-generate | Generate lots of file for ansible roles based on a few input files. |
ansible-probe | Test ansible roles on different distributions and version. |
ansible-tester | Try roles against vagrant machines before pushing or releasing. |
pre-commit | Some pre-commit hooks to test Ansible code. |
Tests
Unit tests and integration tests are use to verify the quality of the roles, read more about testing
Issues & pull requests
See the overview of issues and pull requests.
Distributions
The goal is to let all Ansible roles work on as many distributions as possible, but this is sometimes not possible. For each distribution, the current and previous release is tested. A role may work on diferent distributions, like Red Hat Enterprise Linux (RHEL), but it’s not tested against it. By default these Linux distributions are included in the tests:
Distribution | Version(s) |
---|---|
Archlinux | latest |
Alpine | latest & edge* |
CentOS | 7 & latest |
Debian | stable & unstable* |
Fedora | latest & rawhide* |
OpenSUSE | leap & tumbleweed |
Ubuntu | latest, devel* & rolling |
- = These are experimental, builds are done for informative purposes and may fail.
Ansible versions
The goal is to let all roles work on these Ansible version:
- 2.8
- 2.9
- 2.10
- 2.11
- 2.12
- devel (which is allowed to fail)
See errors? Please help and make a merge request on git.