Architecture#
How the arillso projects depend on each other, how the collection roles are structured, and how the projects are built and released.
Projects and dependencies#
flowchart LR
system["arillso.system"]
container["arillso.container"]
agent["arillso.agent"]
image["arillso/ansible image"]
goansible["go.ansible"]
action["action.playbook"]
container -->|galaxy.yml dependency| system
agent -->|galaxy.yml dependency| system
action -->|Go module| goansible
action -->|runtime base image| image
Project |
Depends on (source) |
|---|---|
|
|
|
|
|
|
|
Alpine Linux base; |
|
|
|
Calls the |
The container image does not contain the arillso collections. Playbooks
that use them install the collections at run time, for example through
the galaxy_file input of the action.
Collections#
Content per collection:
Collection |
Roles |
Plugins |
|---|---|---|
|
Modules |
|
|
Filters |
|
|
Filter |
Two roles are named tailscale: arillso.agent.tailscale installs
the Tailscale client on a host, arillso.container.tailscale manages
Tailscale resources in a Kubernetes cluster through a kubeconfig.
Role layout#
The collection CONTRIBUTING.md files define this layout:
roles/<role>/
├── defaults/main.yml # user-configurable variables
├── handlers/main.yml
├── meta/
│ ├── main.yml # platforms, min_ansible_version
│ └── argument_specs.yml # variable specification
├── tasks/main.yml
├── templates/
└── vars/ # per-OS variables
Variables carry the role name as prefix (
packages_list,k3s_version).meta/argument_specs.ymlis the source of the role pages in this guide; Ansible validates role variables against it at run time.meta/main.ymllists the supported platforms per role: Debian, Ubuntu and, for most roles, Enterprise Linux.
Entry points#
Several roles define more than one entry point in
meta/argument_specs.yml. Each entry point is a task file that can be
run on its own with tasks_from:
Role |
Entry points besides |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Install packages only
ansible.builtin.include_role:
name: arillso.system.packages
tasks_from: install
vars:
packages_list:
- name: git
Container image#
arillso/ansible (Dockerfile in arillso/docker.ansible):
Multi-stage build on Alpine Linux. The builder stage creates a Python virtual environment under
/pipx/venvs/ansible; the production stage copies it.Runs as
ansible(UID/GID 1000),/sbin/tiniis PID 1,STOPSIGNAL SIGINT./etc/ansible/ansible.cfgsetshost_key_checking = False,pipelining = Trueand registers the Mitogen strategy path without making it the default.Published to Docker Hub (
arillso/ansible) andghcr.io/arillso/ansibleforlinux/amd64andlinux/arm64. Tags:latest, theansible-coreversion, and the version with a commit SHA suffix.
Details: docker.ansible.
GitHub Action#
action.playbook is a Docker action. action.yml points to the
prebuilt image ghcr.io/arillso/action.playbook; that image contains a
Go binary built on go.ansible and is based on arillso/ansible.
The binary maps the action inputs to ansible-galaxy and
ansible-playbook arguments. Outputs are status and
exit_code. Details: action.playbook.
Go library#
go.ansible (module github.com/arillso/go.ansible/v2) exposes
NewPlaybook() and a Config struct. Playbook.Exec(ctx)
optionally installs Galaxy requirements and then runs
ansible-playbook with arguments built from Config. SSH keys and
vault passwords are written to temporary files in Config.TempDir
(default os.TempDir()). Details: go.ansible.
Build and release#
All repositories call reusable workflows from arillso/.github.
Repository |
Trigger |
Reusable workflows |
|---|---|---|
Collections |
pull request |
|
Collections |
push to |
|
Collections |
tag |
|
Collections |
schedule |
Security workflows; the set differs per repository
( |
|
push to |
Builds and pushes the image to Docker Hub and GHCR |
|
schedule |
|
|
tag |
Builds and pushes |
|
pull request |
|
This guide#
This site is built by build.sh in arillso/guide. It fetches the
collection versions pinned in versions.env (updated by Renovate),
renders the role and plugin pages with antsibull-docs from the
collections’ argument_specs.yml and plugin documentation, and runs
Sphinx with -W.
See also
Quick Start - Install and use the collections
Development Environment - Development setup for the collections
CI/CD & Linting - CI/CD workflows
Repository Standards - Repository standards