- Python 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
sshd on another port than 22. Flatcar starts sshd per connection from sshd.socket, so the port is a drop-in for that socket (10-belowtoxic-port.conf), not sshd's Port setting. The default scenario boots with port 2200 (belowtoxic.testing 0.3.0: guest_ssh_port) and checks that nothing else listens for SSH. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PVUe4g65L7UnUVqHmQp7kG |
||
| .forgejo/workflows | ||
| changelogs | ||
| extensions/molecule | ||
| meta | ||
| plugins | ||
| roles/ignition | ||
| tests/unit/plugins/filter | ||
| .ansible-lint | ||
| .copier-answers.yml | ||
| .gitignore | ||
| .gitleaks.toml | ||
| .pre-commit-config.yaml | ||
| .yamllint | ||
| CHANGELOG.md | ||
| CONTRIBUTING.md | ||
| galaxy.yml | ||
| LICENSE | ||
| README.md | ||
| ruff.toml | ||
| SECURITY.md | ||
belowtoxic.flatcar
Flatcar Container Linux guests, configured once at first boot with Ignition.
- Ignition configs are composed from fragments in plain YAML (no Butane binary needed): users, files, links, systemd units and kernel arguments merge by name or path, later fragments win.
- A role builds the usual guest settings: SSH hardened (no passwords, no
root) with optional SSH user CA and principals, static networking
from
belowtoxic.networking.network_plan, DNS, time zone and the update strategy with a reboot window. - A data partition behind ROOT on the boot disk keeps application data
across reboots, OS updates and in-place re-provisioning (
flatcar-reset), without paying for a cloud volume. - No secrets in Ignition: it is readable on the hypervisor (fw_cfg) and in cloud metadata. Configs contain public keys only.
Part of belowtoxic-ansible.
Content
| Name | Type | Purpose |
|---|---|---|
belowtoxic.flatcar.ignition |
role | composes a guest's Ignition config (fact ignition_config, optional file) |
belowtoxic.flatcar.ignition_compose |
filter | merges Ignition 3.4.0 fragments, inline contents and octal modes as conveniences |
belowtoxic.flatcar.ignition_base |
filter | fragments for host name, users, SSH CA, network, DNS, time zone, updates |
belowtoxic.flatcar.ignition_networkd |
filter | systemd-networkd file for a guest NIC from network_plan |
Example
- name: Ignition for web1
ansible.builtin.include_role:
name: belowtoxic.flatcar.ignition
vars:
ignition_hostname: web1
ignition_ssh_user_ca_keys: ["{{ infra_global.ssh_user_ca }}"]
ignition_ssh_principals: {core: [admins]}
ignition_network: "{{ guest_plan.config }}"
ignition_network_mac: "{{ guest_plan.mac }}"
ignition_update_window_start: Sun 04:00
ignition_fragments:
- systemd:
units:
- name: caddy.service
enabled: true
contents: |
[Service]
ExecStart=/usr/bin/docker run --rm --name caddy -p 443:443 caddy:2
[Install]
WantedBy=multi-user.target
belowtoxic.virtualization.vm passes the result to libvirt guests via
fw_cfg; Hetzner Cloud servers take it as user_data.
Testing
Unit tests for merging, validation and the generated files.
extensions/molecule/default boots Flatcar stable with a rendered config
and checks from outside: sshd settings, certificate logins (an admin
principal gets in, another one does not), static addresses and routes,
update settings and time zone. extensions/molecule/persistence proves the
data partition: created on the first boot with ROOT capped, kept across
reboots and across flatcar-reset with a changed config, while ROOT is
cleaned and the SSH host keys and machine ID are kept.
License
GPL-3.0-or-later, see LICENSE.