david_igou.armbian.bootstrap_armbian role – Provision an SSH-key user with passwordless sudo on a flashed Armbian board
Note
This role is part of the david_igou.armbian collection (version 0.0.5-alpha).
It is not included in ansible-core.
To check whether it is installed, run ansible-galaxy collection list.
To install it use: ansible-galaxy collection install david_igou.armbian.
To use it in a playbook, specify: david_igou.armbian.bootstrap_armbian.
Entry point main – Provision an SSH-key user with passwordless sudo on a flashed Armbian board
Synopsis
Connects as the Armbian default user (root) using the supplied password, creates an unprivileged user, authorises a fixed set of SSH keys for it, grants passwordless sudo via a visudo-validated drop-in, removes Armbian’s first-login TUI sentinel, and disables PasswordAuthentication in sshd (handler restarts sshd).
Idempotent: re-running against an already-bootstrapped board reconciles authorized_keys and is otherwise a no-op.
Fail-fasts when armbian_bootstrap_ssh_keys is empty — otherwise the role would create a user with no authorised keys and then disable password auth, leaving the board permanently unreachable.
Parameters
Parameter |
Comments |
|---|---|
Public SSH keys to authorise for the new user. MUST be non-empty — an empty list combined with the role’s PasswordAuthentication=no step would render the board permanently unreachable. The runtime assertion in tasks/main.yml enforces this. |
|
Username to create on the board. Should match the ansible_user the rest of the inventory connects as so subsequent plays land as this user. Default: |