No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
oliver.maklott f9330250fb
All checks were successful
ci / build (push) Successful in 1s
ci / units (push) Successful in 3s
ci / sanity (push) Successful in 6s
ci / lint (push) Successful in 7s
ci / molecule (push) Successful in 3m46s
release / release (push) Successful in 2s
belowtoxic.flatcar 0.4.0: ignition_ssh_port
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
2026-11-29 09:14:37 +00:00
.forgejo/workflows belowtoxic.flatcar 0.1.0: Ignition configs for Flatcar guests 2026-11-22 21:32:05 +00:00
changelogs belowtoxic.flatcar 0.4.0: ignition_ssh_port 2026-11-29 09:14:37 +00:00
extensions/molecule belowtoxic.flatcar 0.4.0: ignition_ssh_port 2026-11-29 09:14:37 +00:00
meta belowtoxic.flatcar 0.1.0: Ignition configs for Flatcar guests 2026-11-22 21:32:05 +00:00
plugins belowtoxic.flatcar 0.4.0: ignition_ssh_port 2026-11-29 09:14:37 +00:00
roles/ignition belowtoxic.flatcar 0.4.0: ignition_ssh_port 2026-11-29 09:14:37 +00:00
tests/unit/plugins/filter belowtoxic.flatcar 0.4.0: ignition_ssh_port 2026-11-29 09:14:37 +00:00
.ansible-lint belowtoxic.flatcar 0.1.0: Ignition configs for Flatcar guests 2026-11-22 21:32:05 +00:00
.copier-answers.yml belowtoxic.flatcar 0.1.0: Ignition configs for Flatcar guests 2026-11-22 21:32:05 +00:00
.gitignore belowtoxic.flatcar 0.1.0: Ignition configs for Flatcar guests 2026-11-22 21:32:05 +00:00
.gitleaks.toml belowtoxic.flatcar 0.1.0: Ignition configs for Flatcar guests 2026-11-22 21:32:05 +00:00
.pre-commit-config.yaml belowtoxic.flatcar 0.1.0: Ignition configs for Flatcar guests 2026-11-22 21:32:05 +00:00
.yamllint belowtoxic.flatcar 0.1.0: Ignition configs for Flatcar guests 2026-11-22 21:32:05 +00:00
CHANGELOG.md belowtoxic.flatcar 0.4.0: ignition_ssh_port 2026-11-29 09:14:37 +00:00
CONTRIBUTING.md belowtoxic.flatcar 0.1.0: Ignition configs for Flatcar guests 2026-11-22 21:32:05 +00:00
galaxy.yml belowtoxic.flatcar 0.4.0: ignition_ssh_port 2026-11-29 09:14:37 +00:00
LICENSE belowtoxic.flatcar 0.1.0: Ignition configs for Flatcar guests 2026-11-22 21:32:05 +00:00
README.md belowtoxic.flatcar 0.3.0: data partition behind ROOT 2026-11-27 18:49:28 +00:00
ruff.toml belowtoxic.flatcar 0.1.0: Ignition configs for Flatcar guests 2026-11-22 21:32:05 +00:00
SECURITY.md belowtoxic.flatcar 0.1.0: Ignition configs for Flatcar guests 2026-11-22 21:32:05 +00:00

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.