Ansible — SSH host certificate deployment
Source:
ansible/README.md
The ssh_host_cert role and the pki_manager module that drives the PKI Manager
REST API now live in the oriolrius.pki_manager
Ansible Collection (Galaxy).
This directory keeps only a thin deploy entry point (site.yml) that consumes
the collection, plus the dockerized end-to-end suite under tests/e2e/.
The role provisions a full SSH-CA node in one run: the host key is generated
on the node (private key never leaves it), its public key is signed, the
User/Host-CA trust anchors + login-RBAC principals + the authoritative sshd
drop-in are installed, unattended renewal is set up, and a KRL revocation channel
(public cron or encrypted krl-client) is deployed. Every PKI Manager API
call goes through the collection module (REST, no curl).
cd ansibleansible-galaxy collection install -r requirements.yml # pulls oriolrius.pki_manager + community.crypto
# fleet token (pkimg_…, scoped to the Host CA) via Ansible Vault:ansible-vault create secrets.yml # set: ssh_ca_fleet_token: pkimg_…
cp inventory.yml.example inventory.yml # edit hostsansible-playbook -i inventory.yml site.yml \ -e ssh_ca_base_url=https://pki.example.com \ -e @secrets.yml --ask-vault-passWhere things are
Section titled “Where things are”| What | Where |
|---|---|
The ssh_host_cert role + variable reference |
oriolrius.pki_manager → roles/ssh_host_cert |
Every SSH API action (pki_manager module) |
collection README |
| Complete deploy-a-server-and-a-user example | examples/ssh_deploy_server_and_user.yml |
| Operator guide (mental model → login → revoke) | docs/ssh/deploy-server-and-user.md |
| Dockerized containers-as-hosts e2e | tests/e2e/ |
Until
oriolrius.pki_manager >= 2.3.0is published to Galaxy,requirements.ymlinstalls the collection from itsfeat/ssh-workflowgit branch. Switch to the Galaxy version once released.
For per-host access blocks (decision-016) — trust-anchor ordering, canary,
cutover, rollback — follow docs/ssh/host-blocks-runbook.md.