hostcd

From the engineering log · November 12, 2026

Ansible from cron works — until nobody knows whether it worked

By Danylo Kochetov

For a long time, one of my infrastructure setups relied on a perfectly reasonable automation stack:

It was simple, inexpensive and understandable. More importantly, it worked.

Then the number of servers grew. Not dramatically — this was not a thousand-node hyperscale fleet. But it grew enough that ordinary questions started taking longer to answer.

Cron could tell me that a command had started. Ansible could tell me what happened during that run. Neither continuously told me whether the fleet still matched Git.

That distinction is easy to ignore until something goes wrong.

Cron was not the mistake

Running Ansible from cron is often treated as an embarrassing temporary solution. I do not think that is fair.

For five servers and a small number of predictable jobs, it can be exactly the right solution. There is little infrastructure to maintain, every engineer understands it, and failures are usually easy to investigate.

Problems appear when the scheduled job quietly becomes the control plane.

At that point, several assumptions begin to break down.

A successful run is not the same as a correct current state

An Ansible job may finish successfully at 02:00. At 02:15, someone changes a configuration file manually. At 02:30, a package update restarts a service with different defaults.

The job succeeded, but the host has already drifted.

You can run Ansible more frequently, but that only reduces the interval. It does not give the system a persistent understanding of desired and actual state.

Offline hosts create gaps

A server that is unavailable during a scheduled run simply misses it.

You can add retries, wrapper scripts and queues. Eventually, however, the cron setup starts acquiring the responsibilities of an orchestration system — without a clear model for them.

Logs answer the wrong question

A log can show that a task failed on Tuesday at 03:17.

The operational question on Wednesday is usually simpler:

Is this host correct now?

Reconstructing that answer from job logs, shell history and monitoring alerts is possible. It is also a poor use of an engineer's time.

Partial failures become normal

A playbook applied successfully to 18 servers and failed on two. The next run fixed one of them. Someone repaired the other manually.

What is the fleet state now?

Without a dedicated inventory and state view, the answer often becomes "probably fine".

"Probably fine" does not scale particularly well.

AWX solves a different part of the problem

The obvious next step is often AWX or Ansible Automation Platform.

That can be the correct choice.

AWX gives you centralised job execution, inventories, credentials, schedules, access control and a history of runs. If the main problem is coordinating Ansible execution across a team, AWX is a substantial improvement over cron.

But AWX is primarily centred around jobs.

You select or schedule a playbook, it runs against an inventory, and the system records the result. That is useful orchestration.

Continuous reconciliation starts from a different question:

What state should this host have, and does it still have that state right now?

Neither model is universally better. They solve overlapping but different problems.

Job orchestration and reconciliation

A job-oriented system thinks in executions:

  1. Choose an inventory.
  2. Start a playbook.
  3. Record its result.
  4. Repeat when necessary.

A reconciliation system thinks in state:

  1. Git declares the desired configuration.
  2. An agent reports the host's actual state.
  3. The controller compares the two.
  4. Drift is reported or corrected.
  5. The process continues.

This is roughly the distinction between deploying something once and continuously verifying that it remains deployed.

Kubernetes made this model familiar for clusters. Traditional Linux servers often still depend on periodic jobs and manual inspection.

That is not always a problem. But it becomes one when those servers are important enough that you need a reliable answer to "what is actually running?"

Cron, AWX or continuous reconciliation?

Here is the practical version.

Keep Ansible from cron when the fleet is small, the tasks are predictable, failures are easy to notice, and nobody needs a central operational view.

Choose AWX when multiple people need to launch and approve Ansible workflows, manage credentials, and inspect execution history.

Consider continuous reconciliation when the requirement is not merely "run this playbook every hour", but "keep these hosts aligned with Git and show me when they are not".

Why I built hostcd

I built hostcd because I wanted the last model for ordinary Linux and Windows hosts.

The basic idea is deliberately unoriginal: use the GitOps reconciliation model that works well in Kubernetes, but apply it to hosts that are not Kubernetes nodes.

Applications and host groups are declared in Git. Agents poll for desired state and report their current state. The controller shows which hosts are online, which revision they use, and whether their resources are synced and healthy.

The pull model matters here. A host does not need to accept arbitrary inbound SSH connections from the control plane for every reconciliation cycle. It contacts the controller, receives the applicable desired state and reports the result.

hostcd is not intended to replace every Ansible installation.

It does not make sense to migrate a working five-server cron setup merely because a newer tool exists. It also does not try to reproduce AWX's complete workflow and execution model.

The useful case is narrower: you have a growing host fleet, Git already describes much of its configuration, and scheduled execution no longer gives you enough confidence in the current state.

What a migration looks like

A migration should start with one boring resource on one non-critical host.

Not the database. Not the entire production baseline. Something easy to verify, such as:

The process is straightforward:

  1. Keep the existing Ansible automation in place.
  2. Express one resource as hostcd desired state in Git.
  3. Connect a test host.
  4. Compare the reported state with the current Ansible result.
  5. Introduce deliberate drift.
  6. Confirm that the drift is detected and, if enabled, corrected.
  7. Remove the corresponding scheduled task only after the new path is understood.

The goal is not a dramatic migration weekend. It is to replace uncertain periodic automation one small piece at a time.

There is a step-by-step version of this in the Ansible cron → hostcd migration guide.

When you should not use hostcd

You probably should not use it if:

hostcd is still an early product. That means the feedback loop with its first users matters more than pretending every infrastructure problem has already been solved.

The question I would ask

Do not begin by asking which tool has the longest feature list.

Ask this instead:

When a server drifts from Git at 03:00, how and when will we know?

If the answer is clear and reliable, your current system may already be good enough.

If the answer involves waiting for the next scheduled run, searching several logs and checking the host manually, it may be time to move from periodic execution toward continuous reconciliation.


You can explore a read-only hostcd environment here: demo.hostcd.dev → (synthetic, anonymous, read-only). Then follow the migration guide.

If you have a real Ansible cron setup and want to test the migration on one host, write to [email protected]. I am looking for a small number of early design partners, and I will help with the first deployment personally.