docs(sshd): apply review notes to the argument spec and README
Build / build (pull_request) Successful in 11s
Lint / lint (pull_request) Successful in 31s
Molecule / molecule (pull_request) Successful in 35s

The main entry's description now lists all four refusals (the pve
rsa-sha2-512 guard and the ssh-rsa guard were missing, already in the
source). The README no longer names user_management as if it were a role
of this Collection, and says the scenario runs in the Collection's CI
rather than only on pull requests.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
This commit is contained in:
Defame1297andClaude Opus 5.5 committed 2026-11-15 22:25:50 +00:00
1 parent 915f588533
commit 9d7625f529
2 files changed
+6 -4

No files matched your search

+2 -2
View File
@@ -10,7 +10,7 @@ Ubuntu 24.04 (noble), the image the molecule scenario runs on. 22.04 (jammy) and
- Use it by its fully qualified name, `mortis.kamino.sshd`.
- The target must be reachable over SSH and have `ssh-keygen` and `sshd` installed. The role uses `become`.
- Install the public key of `ansible_user` before this role runs (for example with a `user_management` role earlier in the play), so key login works before password authentication is turned off. The role does not install keys.
- Install the public key of `ansible_user` before this role runs (for example with a user-management role earlier in the play), so key login works before password authentication is turned off. The role does not install keys.
- `sshd_profile` is set by the calling play: `pve`, `ubuntu_lxc` or `ubuntu_vm`.
- The role reads `ansible_user` and sets `ansible_ssh_user` to it for the rest of the play, in case the connection was bootstrapped as root.
- Role dependencies are not declared in `meta/main.yml`; the order above is the contract.
@@ -60,4 +60,4 @@ The role defines none.
- `meta/argument_specs.yml` has only the `main` entry point. `tasks_from: validate.yml` is used by the molecule scenario to load defaults and exercise the guards, not by consumers, so it has no spec.
- The `pve` profile sets `PermitRootLogin prohibit-password`. Proxmox cluster SSH (migration, console proxy, replication) logs in as root with keys only. Passwords are already off through `PasswordAuthentication no`; this keeps root key-only if they are ever turned back on. Join nodes through the default API join, not `pvecm add --use_ssh`, which needs root password SSH.
- Host key and public key algorithms are `ssh-ed25519` only, except in the `pve` profile, which allows `ssh-ed25519,rsa-sha2-512,rsa-sha2-256` for both: Proxmox cluster SSH (migration, console proxy) checks each node's RSA host key against `/etc/pve/nodes/<node>/ssh_known_hosts` and logs in with root's RSA key. SHA-1 `ssh-rsa` stays refused.
- Molecule: `molecule/default`, run in CI on pull requests that change the role. It converges the `ubuntu_lxc` profile; the `pve` profile is checked by rendering its drop-in to a scratch file and parsing it with `sshd -T -f`.
- Molecule: `molecule/default`, run by the Collection's CI. It converges the `ubuntu_lxc` profile; the `pve` profile is checked by rendering its drop-in to a scratch file and parsing it with `sshd -T -f`.
+4 -2
View File
@@ -7,8 +7,10 @@ argument_specs:
Validates the profile and the merged settings, runs C(ssh-keygen -A), installs the drop-in checked with C(sshd -t) and
reloads sshd through a handler.
- >-
Refuses to run when password authentication is off and public key authentication is not C(yes), and when the C(pve)
profile does not permit root key login (C(PermitRootLogin) must be C(prohibit-password), C(without-password) or C(yes)).
Refuses to run when password authentication is off and public key authentication is not C(yes); when the C(pve)
profile does not permit root key login (C(PermitRootLogin) must be C(prohibit-password), C(without-password) or C(yes));
when the C(pve) profile's C(HostKeyAlgorithms) or C(PubkeyAcceptedAlgorithms) lacks C(rsa-sha2-512); and when any
profile lists SHA-1 C(ssh-rsa) in either.
- Reads C(ansible_user), which is not a role input, and sets C(ansible_ssh_user) to it for the rest of the play.
- >-
C(sshd_settings_effective), the merged result read by the template and tasks/validate.yml, is deliberately not listed: