Skip to content

Variables

Every role is configured only through variables. This page lists them per role. The data comes from each role’s meta/argument_specs.yml (type and description) and defaults/main.yml (default); Ansible validates the values against the specs before a role runs.

Roles are listed in the order of the role guides. A role’s own page explains how the variables work together; this page is the lookup table.

The list of dict variables take entries with the keys described in the role guide.

Baseline for Debian and Ubuntu servers. See the base guide.

VariableTypeDefaultDescription
base_packageslist of str["ca-certificates", "curl", "gnupg", "htop", "jq", "rsync", "unattended-upgrades"]Packages installed on every host.
base_timezonestr"Etc/UTC"System time zone.
base_swap_size_mbint0Size of the swap file in MiB; 0 leaves swap alone.
base_swap_filepath"/swapfile"Path of the swap file.
base_swappinessint10vm.swappiness while a swap file is managed.
base_journald_max_usestr"500M"journald SystemMaxUse.
base_unattended_upgradesbooltrueEnable unattended security upgrades.
base_unattended_rebootboolfalseLet unattended-upgrades reboot when an upgrade needs it.
base_unattended_reboot_timestr"04:00"Time of day for such a reboot.
base_sshd_hardeningbooltrueHarden sshd with a drop-in: key-only login, no forwarding of agents, X11 or tunnels, VERBOSE logging (key fingerprints, used by fail2ban and CrowdSec), connection limits and modern algorithms only. The base_sshd_* options below tune it; none of them applies while this is off.
base_sshd_listen_addresseslist of str[]Addresses sshd binds to. Empty keeps the distribution default. When set, socket activation is turned off and the nonlocal bind sysctls are enabled, so sshd starts even before an address is up.
base_sshd_portint22sshd port.
base_sshd_permit_root_loginstr"prohibit-password"PermitRootLogin. The default lets root log in with a key only; set “no” once every play connects as an unprivileged user. One of: yes, prohibit-password, forced-commands-only, no.
base_sshd_allow_userslist of str[]AllowUsers patterns (user or user@host). Empty writes no AllowUsers line. Include the user Ansible connects as, or the next run is locked out.
base_sshd_max_auth_triesint3MaxAuthTries; keep it above the number of keys a client offers.
base_sshd_login_grace_timeint30LoginGraceTime in seconds.
base_sshd_max_sessionsint10MaxSessions per connection; Ansible’s multiplexing needs several.
base_sshd_max_startupsstr"10:30:60"MaxStartups (start:rate:full) for unauthenticated connections.
base_sshd_client_alive_intervalint300ClientAliveInterval in seconds.
base_sshd_client_alive_count_maxint2ClientAliveCountMax; an idle, unresponsive session is closed after interval times count seconds.
base_sshd_allow_tcp_forwardingstr"no"AllowTcpForwarding; “local” is enough for ssh -L tunnels to private services. One of: yes, no, all, local, remote.
base_sshd_kex_algorithmslist of str["sntrup761x25519-sha512@openssh.com", "curve25519-sha256", "curve25519-sha256@libssh.org"]KexAlgorithms. The default works on OpenSSH 9.6 (Ubuntu 24.04) and later; add mlkem768x25519-sha256 first where every host runs OpenSSH 9.9 or later.
base_sshd_cipherslist of str["chacha20-poly1305@openssh.com", "aes256-gcm@openssh.com", "aes128-gcm@openssh.com"]Ciphers.
base_sshd_macslist of str["hmac-sha2-512-etm@openssh.com", "hmac-sha2-256-etm@openssh.com"]MACs (only used by non-AEAD ciphers).
base_nonlocal_bindboolfalseEnable net.ipv4.ip_nonlocal_bind and net.ipv6.ip_nonlocal_bind, so services (sshd, published container ports) can bind an address before it is up at boot. The IPv6 key is skipped on a kernel without IPv6. Always on when base_sshd_listen_addresses is set.
base_static_routeslist of dict[]Routes (to, via) set by a oneshot unit after the network is up, on the interface the gateway is reached through. For example a home LAN behind a private network gateway on a host that also has a public interface.

Docker CE with the compose plugin. See the docker guide.

VariableTypeDefaultDescription
docker_packageslist of str["docker-ce", "docker-ce-cli", "containerd.io", "docker-buildx-plugin", "docker-compose-plugin"]Packages installed from the Docker apt repository.
docker_mtuint1500MTU of the default bridge (1450 on Hetzner private networks). Compose networks need their own driver option; the stacks of this collection set it from the same value.
docker_log_driverstr"local"Default log driver.
docker_log_optsdict{"max-size": "20m", "max-file": "5"}Options of the default log driver.
docker_address_poolslist of dict[]default-address-pools entries (base, size); empty keeps Docker’s default.
docker_live_restorebooltrueKeep containers running while the daemon restarts.
docker_daemon_extradict{}Further daemon.json keys, merged last.
docker_userslist of str[]Users added to the docker group.

Tailscale node, optionally a subnet router. See the tailscale guide.

VariableTypeDefaultDescription
tailscale_auth_keystr""Auth key used only when the node is not logged in yet. Keep it in a vault. It is handed to tailscale through a temporary file, never on the command line.
tailscale_hostnamestr"{{ inventory_hostname_short }}"Node name in the tailnet.
tailscale_advertise_routeslist of str[]Subnets this node routes into the tailnet; enables IP forwarding.
tailscale_accept_routesboolfalseUse subnet routes advertised by other nodes.
tailscale_accept_dnsboolfalseLet Tailscale manage DNS on this host.
tailscale_advertise_tagslist of str[]ACL tags (tag:name) the node advertises when it joins; changing them later needs a re-join.
tailscale_sshboolfalseEnable Tailscale SSH.

Standalone Traefik with DNS-01 or HTTP-01 certificates. See the traefik guide.

VariableTypeDefaultDescription
traefik_imagestr"traefik:v3.7.17"Traefik image.
traefik_socket_proxy_imagestr"tecnativa/docker-socket-proxy:v0.5.0"Docker socket proxy image; Traefik never sees the socket itself.
traefik_dirpath"/opt/traefik"Directory of the compose project and its state.
traefik_projectstr"traefik"Compose project name.
traefik_log_levelstr"INFO"Traefik log level. One of: DEBUG, INFO, WARN, ERROR.
traefik_access_logboolfalseWrite an access log to stdout.
traefik_mtuint1500MTU of the compose networks (1450 on Hetzner private networks).
traefik_networkstr"proxy"Name of the shared network.
traefik_network_subnetstr"172.31.255.0/24"Subnet of the shared network.
traefik_network_rangestr"172.31.255.0/25"Part of the subnet Docker assigns from; must not contain traefik_address.
traefik_addressstr"172.31.255.254"Fixed address of Traefik on the shared network.
traefik_entrypointslist of dict[{"name": "web", "port": 80, "redirect_to": "websecure"}, {"name": "websecure", "port": 443, "tls": true, "as_default": true}]Entrypoints; see defaults/main.yml for the keys. Keys are name, port, host_port, bind, protocol, tls, as_default, redirect_to and middlewares. host_port publishes the container port on another host port, so two entrypoints can share a host port on different bind addresses. A redirect to such an entrypoint goes to its host_port. middlewares lists middlewares (for example name@file) that every router on the entrypoint gets; an entrypoint with redirect_to cannot have them.
traefik_acme_emailstr""ACME account e-mail; required when an entrypoint terminates TLS.
traefik_acme_ca_serverstr"https://acme-v02.api.letsencrypt.org/directory"ACME directory (use the staging directory for tests).
traefik_acme_challengestr"dns"ACME challenge, also the name of the cert resolver. dns uses DNS-01 through traefik_dns_provider and can issue wildcards. http uses HTTP-01 on traefik_acme_http_entrypoint. Traefik requests a certificate per router host; each host must resolve publicly to this server and reach that entrypoint on host port 80. traefik_cert_domains cannot contain wildcards then. One of: dns, http.
traefik_acme_http_entrypointstr"web"Entrypoint that answers the HTTP-01 challenge; it must exist and listen on host port 80.
traefik_dns_providerstr"hetzner"lego DNS provider for the DNS-01 challenge.
traefik_dns_envdict{}Environment for the DNS provider (API tokens); written to a 0600 file.
traefik_dns_resolverslist of str["1.1.1.1:53", "9.9.9.9:53"]Resolvers used to check DNS propagation.
traefik_cert_domainslist of dict[]Certificates requested on TLS entrypoints (main, sans).
traefik_docker_allow_empty_servicesboolfalseDocker provider allowEmptyServices: keep the routers of containers without a healthy server, so they answer an error instead of disappearing (Traefik 3.7 answers 500, not 503; see the guide).
traefik_error_pages_enabledboolfalseRoute errors to an error pages service. The role writes dynamic/error-pages.yml with the middlewares error-pages-errors and error-pages-compress, a router error-pages-<name> per route and the service error-pages; disabling removes it. The role also runs the error pages container unless traefik_error_pages_container is false.
traefik_error_pages_containerbooltrueRun the error pages container (service error-pages) in the Traefik compose project, read-only, as 65532, with the image’s healthcheck and a volume on /data for maintenance mode. Set to false to run the service elsewhere; then point traefik_error_pages_url at it.
traefik_error_pages_imagestr"noixdev/error-pages:1"Error pages image (noixdev/error-pages or compatible).
traefik_error_pages_envdict{"THEME": "glass", "LANGUAGES": "en,de", "DEFAULT_LANGUAGE": "en", "SHOW_DETAILS": "false"}Environment of the error pages container; replaces the defaults as a whole.
traefik_error_pages_cpusstr"0.25"CPU limit of the error pages container.
traefik_error_pages_memorystr"64M"Memory limit of the error pages container, for example 64M.
traefik_error_pages_urlstr"http://error-pages:8080"URL of the error pages service, which serves /<code>.html; the default is the bundled container.
traefik_error_pages_statuslist of str["502-504"]Backend statuses (codes or ranges like 502-504) replaced by the matching page.
traefik_error_pages_entrypointslist of str[]Entrypoints whose routers all get error-pages-compress (if enabled) and error-pages-errors, before the entrypoint’s own middlewares. Must exist in traefik_entrypoints and must not redirect.
traefik_error_pages_compressbooltrueCompress responses on those entrypoints, limited to traefik_error_pages_compress_types.
traefik_error_pages_compress_typeslist of str["text/html", "text/plain", "application/json"]Content types the compress middleware compresses.
traefik_error_pages_routeslist of dict[]Routers that always answer with one page, for unknown hosts or names that must not be served on an entrypoint. Keys are name ([a-z0-9-]+, unique), entrypoints (required), rule (default HostRegexp(.+)), priority (default 1; higher wins) and page (a status code or internal, default 404). The page is requested as /<page>.html.
traefik_dynamic_filesdict{}File-provider files, name to YAML content.

Portainer server or agent. See the portainer guide.

VariableTypeDefaultDescription
portainer_modestr"server"Run the Portainer server or an agent a server connects to. One of: server, agent.
portainer_versionstr"2.45.3"Version of both images; server and agents must match.
portainer_dirpath"/opt/portainer"Directory of the compose project.
portainer_projectstr"portainer"Compose project name.
portainer_mtuint1500MTU of the compose network.
portainer_agent_secretstr""Shared secret of server and agents (AGENT_SECRET). Keep it in a vault.
portainer_hoststr""Server only. Host name Traefik routes to the UI; empty adds no route.
portainer_traefik_networkstr"proxy"Server only. External network Traefik routes on.
portainer_traefik_entrypointstr""Server only. Traefik entrypoint for the route; empty uses Traefik’s default.
portainer_bindlist of str[]Server only. Addresses the UI port 9443 is published on.
portainer_agent_bindlist of str[]Agent only. Addresses the agent port 9001 is published on.

Pulsix manager with its database and local workers. See the pulsix_manager guide.

VariableTypeDefaultDescription
pulsix_manager_versionstr"0.1.0-rc.1"Image tag of the manager and worker images (no leading v).
pulsix_manager_imagestr"noixdev/pulsix-manager"Manager image without tag.
pulsix_manager_worker_imagestr"noixdev/pulsix-worker"Worker image without tag.
pulsix_manager_db_imagestr"timescale/timescaledb:2.30.0-pg18"TimescaleDB image; keep it on the version the Pulsix release names.
pulsix_manager_dirpath"/opt/pulsix"Directory of the compose project.
pulsix_manager_projectstr"pulsix"Compose project name.
pulsix_manager_mtuint1500MTU of the compose network.
pulsix_manager_db_passwordstr""Required. Database password (openssl rand -hex 32). Keep it in a vault.
pulsix_manager_master_keystr""Required. Master key (openssl rand -hex 32). Encrypts secrets and backups. Keep it in a vault and outside the backups.
pulsix_manager_public_urlstr""Required. URL users reach the web interface at.
pulsix_manager_status_domainstr""Domain of public status pages.
pulsix_manager_grpc_server_namestr"pulsix-manager"Name in the worker endpoint’s certificate; every worker must use the same value.
pulsix_manager_grpc_bindlist of str[]Host addresses the worker endpoint 8444 is published on, for remote workers.
pulsix_manager_http_bindlist of str[]Host addresses the web interface 8080 is published on.
pulsix_manager_hoststr""Host name Traefik routes to the web interface.
pulsix_manager_traefik_networkstr"proxy"External network Traefik routes on.
pulsix_manager_traefik_entrypointstr""Traefik entrypoint for the route; empty uses Traefik’s default.
pulsix_manager_trusted_proxiesstr""PULSIX_TRUSTED_PROXIES (CIDRs or addresses, comma separated).
pulsix_manager_workerslist of dict[{"name": "worker-1", "zone": "default"}]Local workers; see defaults/main.yml for the keys.
pulsix_manager_extra_envdict{}Further manager environment variables.
pulsix_manager_print_setup_tokenbooltruePrint the setup token while the setup wizard is not completed.

Remote Pulsix workers enrolled with one-time tokens. See the pulsix_worker guide.

VariableTypeDefaultDescription
pulsix_worker_versionstr"0.1.0-rc.1"Worker image tag (no leading v); keep it on the manager’s version.
pulsix_worker_imagestr"noixdev/pulsix-worker"Worker image without tag.
pulsix_worker_dirpath"/opt/pulsix-worker"Directory of the compose project; each worker keeps its identity and data in a 0700 subdirectory.
pulsix_worker_projectstr"pulsix-worker"Compose project name.
pulsix_worker_mtuint1500MTU of the compose network.
pulsix_worker_manager_addrstr""Required. The manager’s worker endpoint, host:8444.
pulsix_worker_server_namestr"pulsix-manager"The manager’s PULSIX_GRPC_SERVER_NAME.
pulsix_worker_instanceslist of dict[]Workers on this host; see defaults/main.yml for the keys.
pulsix_worker_enroll_tokensdict{}One-time tokens by worker name, for workers without identity. Pass at run time.
pulsix_worker_enroll_timeoutint120Seconds to wait for a new worker’s identity after the start.

fail2ban with nftables bans for sshd and repeat offenders. See the fail2ban guide.

VariableTypeDefaultDescription
security_allowlistlist of str[]Put your management networks here (VPN, private network) so a typo can’t lock you out. IP addresses or CIDRs that are never banned. Shared with the crowdsec role; set it once for all hosts.
fail2ban_ignoreiplist of str["127.0.0.1/8", "::1"]Further addresses or CIDRs that are never banned (loopback by default).
fail2ban_packageslist of str["fail2ban", "nftables"]Packages installed; nftables provides the ban actions.
fail2ban_bantimestr"1h"Default ban duration (fail2ban time abbreviation, e.g. 1h).
fail2ban_findtimestr"10m"Window in which fail2ban_maxretry failures lead to a ban.
fail2ban_maxretryint5Failures within fail2ban_findtime before a ban.
fail2ban_banactionstr"nftables-multiport"Ban action of port-based jails.
fail2ban_banaction_allportsstr"nftables-allports"Ban action of jails that block every port (recidive).
fail2ban_sshdbooltrueEnable the sshd jail.
fail2ban_sshd_portstr"{{ base_sshd_port | default(22) }}"Port(s) the sshd jail bans; base_sshd_port when that is defined, else 22.
fail2ban_recidivebooltrueEnable the recidive jail, which bans repeat offenders on every port.
fail2ban_recidive_bantimestr"1w"Ban duration of the recidive jail.
fail2ban_recidive_findtimestr"1d"Window in which the recidive jail counts earlier bans.
fail2ban_extra_jailslist of dict[]Further jails, each a dict with name and the jail options (enabled, port, filter, logpath, backend, …). Booleans are written as true/false.

CrowdSec agent with the firewall bouncer. See the crowdsec guide.

VariableTypeDefaultDescription
security_allowlistlist of str[]Put your management networks here (VPN, private network) so a typo can’t lock you out. IP addresses or CIDRs that are never banned (a CrowdSec whitelist parser). Shared with the fail2ban role; set it once for all hosts.
crowdsec_allowlistlist of str[]Further addresses or CIDRs that are never banned by this host’s CrowdSec.
crowdsec_apt_urlstr"https://packagecloud.io/crowdsec/crowdsec/any"URL of the CrowdSec apt repository.
crowdsec_apt_suitestr"any"Suite of the repository. “any” carries the same packages for every Debian and Ubuntu release, including ones the per-release suites do not have yet.
crowdsec_apt_key_urlstr"https://packagecloud.io/crowdsec/crowdsec/gpgkey"URL of the repository signing key.
crowdsec_apt_key_fingerprintstr"6A89E3C2303A901A889971D3376ED5326E93CD0C"Fingerprint the downloaded key must carry; the run stops, and the key file is removed, if it does not.
crowdsec_collectionslist of str["crowdsecurity/linux", "crowdsecurity/sshd"]Hub collections that must be installed. Collections installed otherwise are left alone.
crowdsec_acquisitionslist of dict[{"name": "sshd", "source": "journalctl", "journalctl_filter": ["_SYSTEMD_UNIT=ssh.service"], "labels": {"type": "syslog"}}]Log sources, one file each in /etc/crowdsec/acquis.d (noixdev-<name>.yaml): name plus the acquisition keys (source, filenames or journalctl_filter, labels). Files of entries removed from the list are deleted. Keep at least one source; CrowdSec does not start without.
crowdsec_remove_setup_acquisitionsbooltrueDelete the acquis.d/setup.*.yaml files the package generates on first install, so crowdsec_acquisitions is the only source and no log is read twice.
crowdsec_lapi_portint8080Port of the Local API on 127.0.0.1 (8080 by default; change it when the host publishes 8080 itself).
crowdsec_bouncer_namestr"firewall-bouncer"Name the firewall bouncer is registered under in the Local API.
crowdsec_bouncer_docker_userboolnull (unset)Also block in the DOCKER-USER chain, which covers ports published by Docker, and start the bouncer after docker.service. Unset (null): only when /usr/bin/docker exists when the role runs, so run the docker role first.
crowdsec_console_enroll_keystr""Enrollment key from app.crowdsec.net. Empty skips enrollment. When set, the instance is enrolled unless it already is; accept it in the console afterwards.
crowdsec_console_namestr"{{ inventory_hostname_short }}"Name of the instance in the console.

CoreDNS for internal names, forwarding everything else. See the dns guide.

VariableTypeDefaultDescription
dns_imagestr"coredns/coredns:1.13.1"CoreDNS image.
dns_dirpath"/opt/dns"Directory of the compose project.
dns_projectstr"dns"Compose project name.
dns_bindlist of str[]Addresses CoreDNS binds on UDP and TCP port 53. Wildcard addresses are refused.
dns_bind_tailscaleboolfalseAlso bind the addresses of tailscale ip -4 and tailscale ip -6.
dns_allowlist of strrequiredClient networks (CIDR) that get answers. Every other client is refused. 0.0.0.0/0 and ::/0 are refused.
dns_upstreamslist of str["1.1.1.1", "8.8.8.8"]Resolvers that names without a local record are forwarded to.
dns_recordslist of dict[]Names answered locally, served from a managed hosts file. Keys are name (required, lower-case host name) and addresses (required, IPv4 and IPv6 addresses of the name).
dns_ttlint60TTL of the local records in seconds.
dns_cacheint300Seconds forwarded answers are cached; 0 turns the cache off.
dns_log_queriesboolfalseLog every query.
dns_cpusstr"0.25"CPU limit of the container.
dns_memorystr"64M"Memory limit of the container.