Migration guide
From scheduled Ansible to continuous reconciliation
A continuous configuration management alternative to running Ansible from cron. hostcd does not replace all of Ansible — it replaces the scheduled convergence part, and gives you visible drift and self-heal in exchange.
Before: Ansible from cron
*/15 * * * * ansible-playbook -i inventory production.yml
This works, but it is blind between runs:
- cron tells you the playbook ran — not whether a host currently matches Git.
- Drift that happens between runs goes unnoticed until the next pass (or forever, if a task is
changed_when: false). - SSH has to be reachable from the runner to every host.
- There is no single Synced / OutOfSync / Healthy view of the fleet.
- Failures are buried in the logs of one specific run.
After: hostcd
Git repository
↓
hostcd control plane (renders per host, shows drift as a diff, history + rollback)
↓ outbound long-poll (nothing listens on a host; no inbound SSH)
host agents
↓
packages / files / services / users / sysctls / …
The control plane continuously reconciles every host against Git, surfaces drift as a per-resource diff before it applies, and can self-heal manual changes. Agents dial out, so no inbound SSH or open port is required. See core concepts for the model.
The migration path
You do not have to switch everything at once. Run both side by side until you trust it.
- Pick one non-critical playbook and 1–3 hosts.
- Translate the supported resources (packages, files, services, users, groups, cron, sysctls, …) into a hostcd manifest.
- Install the agents — without turning off the Ansible cron yet.
- Compare hostcd's rendered result against the current state. Fix the manifest until they match.
- Temporarily remove the overlapping Ansible tasks for that scope.
- Verify drift/self-heal and a host reboot behave as expected.
- After a stable period, disable the cron entry for that scope.
- Keep Ansible for provisioning and any unsupported modules.
The honest framing
hostcd does not need to replace all of Ansible. Keep Ansible for provisioning and one-off orchestration; use hostcd where you need continuous convergence and visible drift.
Validated on a real host
This is not only a diagram. The migration was run end to end on a real Ubuntu host. A scheduled Ansible playbook (ansible-core 2.16, from a 5-minute cron) managed a package and a config file; the same scope was translated to a hostcd manifest and the cron disabled; hostcd reported Synced / Healthy and took ownership of both resources. Then the config file was edited by hand — the kind of drift that sits unnoticed between cron runs — and hostcd self-healed it in about 12 seconds, back to the state declared in Git. The cron would have reverted it only at the next run, up to five minutes later, and would have shown no OutOfSync status in between.
Running Ansible from cron? Keep your playbooks for provisioning, and move continuously-managed state to hostcd. Install the control plane → · read the concepts · free for up to 10 hosts.