<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Danylo Kochetov</title>
    <description>The latest articles on DEV Community by Danylo Kochetov (@inblade).</description>
    <link>https://dev.to/inblade</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4230777%2F993af6ce-51a5-4cb1-94c8-d5eca8c8e5c1.jpg</url>
      <title>DEV Community: Danylo Kochetov</title>
      <link>https://dev.to/inblade</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/inblade"/>
    <language>en</language>
    <item>
      <title>Ansible ran successfully. So why are my Linux hosts still different?</title>
      <dc:creator>Danylo Kochetov</dc:creator>
      <pubDate>Sat, 21 Nov 2026 10:24:29 +0000</pubDate>
      <link>https://dev.to/inblade/ansible-ran-successfully-so-why-are-my-linux-hosts-still-different-1mml</link>
      <guid>https://dev.to/inblade/ansible-ran-successfully-so-why-are-my-linux-hosts-still-different-1mml</guid>
      <description>&lt;p&gt;I have trusted a lot of green Ansible runs.&lt;/p&gt;

&lt;p&gt;The playbook completed. No failed hosts. The CI job was green. I closed the tab and moved on.&lt;/p&gt;

&lt;p&gt;Then, hours later, one machine was different.&lt;/p&gt;

&lt;p&gt;Someone had stopped a service while troubleshooting. A package had been upgraded manually. A configuration file had been edited directly because the incident was already ten minutes old and nobody wanted to wait for the next pipeline.&lt;/p&gt;

&lt;p&gt;The earlier Ansible run was not wrong. It had succeeded. It just described the fleet at one point in time.&lt;/p&gt;

&lt;p&gt;That distinction matters more than it sounds.&lt;/p&gt;

&lt;h2&gt;
  
  
  A successful run is a historical fact
&lt;/h2&gt;

&lt;p&gt;Ansible is good at applying an intended change to a known set of machines. It is readable, widely understood and backed by a huge ecosystem. I still use it. I am not trying to replace every playbook with a new abstraction.&lt;/p&gt;

&lt;p&gt;The problem begins when a scheduled run is also expected to answer a different question:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Does every host still match the intended state right now?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A cron job cannot answer that between executions. A green CI result at 02:00 does not tell you whether &lt;code&gt;postgresql&lt;/code&gt; is still running at 09:17.&lt;/p&gt;

&lt;p&gt;Running the same job every five minutes narrows the blind interval, but it does not automatically give you a durable model for drift, health, rollout history and recovery.&lt;/p&gt;

&lt;p&gt;You can build those things around Ansible. Many teams do. Eventually, however, the surrounding system becomes the larger part of the problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  What about &lt;code&gt;ansible-playbook --check --diff&lt;/code&gt;?
&lt;/h2&gt;

&lt;p&gt;A reader raised the most direct counterpoint: schedule Ansible in check mode and use &lt;code&gt;--diff&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;That is a valid way to detect drift. Modules that support check mode can report what they would change, and &lt;code&gt;--diff&lt;/code&gt; can show the predicted difference without applying it.&lt;/p&gt;

&lt;p&gt;For a small environment, a scheduled check may be the right solution. It is familiar, inexpensive and does not require another control plane. If it gives your team enough visibility, there is no reason to replace it.&lt;/p&gt;

&lt;p&gt;The tradeoff is that it remains a point-in-time inspection:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;check mode support varies between modules;&lt;/li&gt;
&lt;li&gt;a predicted change does not necessarily tell you whether the resource is healthy;&lt;/li&gt;
&lt;li&gt;you still need somewhere to store results;&lt;/li&gt;
&lt;li&gt;you still need notifications and an operator workflow;&lt;/li&gt;
&lt;li&gt;you still need to connect a finding to remediation history.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The distinction is not that Ansible cannot detect drift. It can.&lt;/p&gt;

&lt;p&gt;The distinction is between periodic drift checks and a long-running model that keeps drift, health, reconciliation and history in one control loop.&lt;/p&gt;

&lt;h2&gt;
  
  
  A small, concrete failure
&lt;/h2&gt;

&lt;p&gt;I used the public HostCD demo to inspect a deliberately broken PostgreSQL application. The demo is read-only and its seeded data resets regularly, so this is evidence of how state is represented, not a production benchmark.&lt;/p&gt;

&lt;p&gt;The application declares three resources for one host:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the &lt;code&gt;postgresql-16&lt;/code&gt; package;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/etc/postgresql/16/main/conf.d/tuning.conf&lt;/code&gt;;&lt;/li&gt;
&lt;li&gt;the &lt;code&gt;postgresql&lt;/code&gt; service.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The package and configuration file are both shown as &lt;strong&gt;Synced&lt;/strong&gt; and &lt;strong&gt;Healthy&lt;/strong&gt;. The service is not. It is &lt;strong&gt;Out of sync&lt;/strong&gt;, &lt;strong&gt;Degraded&lt;/strong&gt;, and carries the reason &lt;code&gt;service failed&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnqjed3h8ynxwlbm1odhv.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnqjed3h8ynxwlbm1odhv.jpg" alt="HostCD resource tree showing a healthy PostgreSQL package and configuration file, while the service is out of sync and degraded" width="800" height="403"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is the useful level of detail.&lt;/p&gt;

&lt;p&gt;"The host is broken" would be too broad. "The last automation job failed" would not tell me what remains correct. Here, the failed resource is isolated without hiding the two resources that still match the desired state.&lt;/p&gt;

&lt;p&gt;The rollout result also preserves the actual failure instead of flattening it into a badge:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rollout halted: 0 of 1 hosts succeeded
db-1: service:postgresql: Job for postgresql failed because
the control process exited with error code
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The history view records the failed attempt, the actor and the affected host count.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffnieqh874xequk6sslq6.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffnieqh874xequk6sslq6.jpg" alt="HostCD operation history showing a failed PostgreSQL rollout and the systemd service error" width="800" height="403"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This does not make the incident disappear. It makes the current state and the attempted transition explicit.&lt;/p&gt;

&lt;h2&gt;
  
  
  Desired state and health are not the same thing
&lt;/h2&gt;

&lt;p&gt;One detail is easy to miss: an application can be out of sync while still healthy.&lt;/p&gt;

&lt;p&gt;In the demo, an Nginx application is behind the target Git revision, but its current resources are healthy. PostgreSQL is both out of sync and degraded because its service has actually failed.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Out of sync, healthy:&lt;/strong&gt; the host is not at the intended revision, but the currently deployed resources are functioning.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Out of sync, degraded:&lt;/strong&gt; the host differs from the intended state and at least one managed resource is broken.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Synced, healthy:&lt;/strong&gt; the managed resources match the target revision and are functioning.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If all three situations collapse into "the last job was green or red," the operator loses useful information.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6e3ax4wbuqairl3f0e8l.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6e3ax4wbuqairl3f0e8l.jpg" alt="HostCD application overview separating sync status from health" width="800" height="403"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The blind interval in scheduled automation
&lt;/h2&gt;

&lt;p&gt;Imagine a simple nightly playbook:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Keep PostgreSQL running&lt;/span&gt;
  &lt;span class="na"&gt;ansible.builtin.service&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;postgresql&lt;/span&gt;
    &lt;span class="na"&gt;state&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;started&lt;/span&gt;
    &lt;span class="na"&gt;enabled&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At 02:00 it succeeds. At 11:10 an engineer stops PostgreSQL while investigating disk pressure and forgets to start it again. The next scheduled run is at 02:00 the following day.&lt;/p&gt;

&lt;p&gt;For almost fifteen hours, the desired state exists in Git and the actual state has diverged. The pipeline remains green because it has not run again.&lt;/p&gt;

&lt;p&gt;This is not an Ansible bug. It is a property of the execution model.&lt;/p&gt;

&lt;p&gt;The usual fixes are familiar:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;run the playbook more often;&lt;/li&gt;
&lt;li&gt;add a monitoring alert;&lt;/li&gt;
&lt;li&gt;trigger remediation from the alert;&lt;/li&gt;
&lt;li&gt;store the outputs somewhere;&lt;/li&gt;
&lt;li&gt;add locking so two runs do not overlap;&lt;/li&gt;
&lt;li&gt;build a view showing which machines converged;&lt;/li&gt;
&lt;li&gt;decide what to do with partial failures.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each step is reasonable. Together they are the beginning of a control plane.&lt;/p&gt;

&lt;h2&gt;
  
  
  What continuous reconciliation changes
&lt;/h2&gt;

&lt;p&gt;With reconciliation, the system repeatedly compares the declared state with the state reported by each agent. The agent pulls work, applies the necessary resource operations and reports the result. The control plane keeps the difference visible until the host converges or the operation fails with a concrete reason.&lt;/p&gt;

&lt;p&gt;For a Linux fleet outside Kubernetes, I wanted the same basic operating idea that made GitOps useful in clusters:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Git contains the intended state.&lt;/li&gt;
&lt;li&gt;Hosts do not need inbound management ports.&lt;/li&gt;
&lt;li&gt;Agents pull the desired work from the control plane.&lt;/li&gt;
&lt;li&gt;The UI separates revision drift from resource health.&lt;/li&gt;
&lt;li&gt;Failed operations retain enough detail to investigate them.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That is why I built HostCD.&lt;/p&gt;

&lt;p&gt;It is not "Ansible with another UI." The useful difference is the long-running reconciliation loop and the state model around it.&lt;/p&gt;

&lt;p&gt;Existing playbooks can still handle provisioning and complex one-off changes. HostCD is aimed at the part that starts after the playbook finishes: keeping the declared host state true.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the demo proves - and what it does not
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Observed in the public demo:&lt;/strong&gt; application-level and resource-level drift, health separated from sync status, a partially healthy resource tree, a target Git revision, and a failed rollout with the underlying service error.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Not proven by the demo:&lt;/strong&gt; production recovery time, large-fleet performance, or automatic repair under every failure mode.&lt;/p&gt;

&lt;p&gt;The next useful measurement is specific: stop a non-critical service on a writable pilot host, record the time of the state change, then record when HostCD detects and repairs it. Publish both timestamps and the configuration used.&lt;/p&gt;

&lt;p&gt;I would rather show that measurement than turn a demo fixture into a benchmark.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try the failure, not just the happy path
&lt;/h2&gt;

&lt;p&gt;If your Linux fleet is currently managed by scheduled Ansible, ask one practical question:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What tells us that a host changed after the last successful run?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If the answer is "the next run," there is a blind interval. If the answer is monitoring, ask whether it only alerts or also connects the failure back to the desired Git state and the remediation history.&lt;/p&gt;

&lt;p&gt;You can inspect the failure in the &lt;a href="https://demo.hostcd.dev/?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=ansible_drift&amp;amp;utm_content=cta" rel="noopener noreferrer"&gt;read-only HostCD demo&lt;/a&gt;. Select the PostgreSQL application, compare the package, file and service resources, then open &lt;strong&gt;Pending changes&lt;/strong&gt; and &lt;strong&gt;History&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;If you manage Linux hosts outside Kubernetes and want to test the same failure on non-critical machines, email &lt;a href="mailto:hello@hostcd.dev?subject=HostCD%20drift%20pilot"&gt;hello@hostcd.dev&lt;/a&gt;. I am looking for a small number of design partners and will help with the first deployment personally.&lt;/p&gt;

&lt;p&gt;For a practical migration path, see &lt;a href="https://hostcd.dev/guides/ansible-cron-to-hostcd/" rel="noopener noreferrer"&gt;From scheduled Ansible to continuous reconciliation&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ansible</category>
      <category>devops</category>
      <category>linux</category>
      <category>sre</category>
    </item>
    <item>
      <title>From Scheduled Ansible to Continuous Reconciliation on Linux Hosts</title>
      <dc:creator>Danylo Kochetov</dc:creator>
      <pubDate>Fri, 06 Nov 2026 16:05:43 +0000</pubDate>
      <link>https://dev.to/inblade/from-scheduled-ansible-to-continuous-reconciliation-on-linux-hosts-483b</link>
      <guid>https://dev.to/inblade/from-scheduled-ansible-to-continuous-reconciliation-on-linux-hosts-483b</guid>
      <description>&lt;p&gt;A scheduled Ansible playbook is a reasonable way to manage a small Linux fleet.&lt;/p&gt;

&lt;p&gt;It is understandable, widely supported, and easy to introduce:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;*/15 * * * * ansible-playbook -i inventory production.yml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every 15 minutes, the runner connects to the hosts and applies the playbook again.&lt;/p&gt;

&lt;p&gt;This works. But it answers a narrower question than many teams eventually need.&lt;/p&gt;

&lt;p&gt;It tells us what happened during the last playbook run. It does not necessarily tell us whether the fleet matches Git right now.&lt;/p&gt;

&lt;h2&gt;
  
  
  The gap between two runs
&lt;/h2&gt;

&lt;p&gt;Imagine that a playbook runs successfully at 10:00.&lt;/p&gt;

&lt;p&gt;At 10:04, someone edits &lt;code&gt;/etc/nginx/nginx.conf&lt;/code&gt; while investigating an incident.&lt;/p&gt;

&lt;p&gt;Until the next run:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Git contains one value;&lt;/li&gt;
&lt;li&gt;the server contains another value;&lt;/li&gt;
&lt;li&gt;no deployment has failed;&lt;/li&gt;
&lt;li&gt;the configuration has drifted;&lt;/li&gt;
&lt;li&gt;the team may not know about it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The next scheduled run may repair the file. But the operating model remains periodic:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Run playbook
    ↓
Wait
    ↓
Something may drift
    ↓
Run playbook again
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A successful cron job also does not automatically provide a current fleet-level answer to questions such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which hosts are converged now?&lt;/li&gt;
&lt;li&gt;Which resource is different from Git?&lt;/li&gt;
&lt;li&gt;When did the drift begin?&lt;/li&gt;
&lt;li&gt;Did a host fail to apply the latest revision?&lt;/li&gt;
&lt;li&gt;Is the service healthy after the change?&lt;/li&gt;
&lt;li&gt;Who approved or initiated the reconciliation?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It is possible to build these capabilities around Ansible using CI jobs, logs, monitoring, AWX, additional databases, and custom automation.&lt;/p&gt;

&lt;p&gt;The question is whether maintaining that control loop is where the team wants to spend its time.&lt;/p&gt;

&lt;h2&gt;
  
  
  A different operating model
&lt;/h2&gt;

&lt;p&gt;I built hostcd around continuous reconciliation.&lt;/p&gt;

&lt;p&gt;A control plane reads the desired state from Git. A lightweight agent on each host connects outbound to the control plane, receives the accepted desired state, compares it with the host, applies changes, and reports the result.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Git repository
       ↓
hostcd control plane
       ↓ outbound agent connection
Linux hosts
       ↓
packages, files, services, users, cron and sysctls
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Instead of waiting for the next scheduled job, each application has an explicit state:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Synced or OutOfSync;&lt;/li&gt;
&lt;li&gt;Healthy, Progressing, Degraded, or Missing;&lt;/li&gt;
&lt;li&gt;the Git revision accepted by the host;&lt;/li&gt;
&lt;li&gt;the resource that differs;&lt;/li&gt;
&lt;li&gt;the result of the last reconciliation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The difference is not YAML versus YAML. It is periodic execution versus a continuously observed control loop.&lt;/p&gt;

&lt;h2&gt;
  
  
  This does not require replacing Ansible
&lt;/h2&gt;

&lt;p&gt;“Replace Ansible” is usually the wrong migration goal.&lt;/p&gt;

&lt;p&gt;Ansible is still useful for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;creating and provisioning machines;&lt;/li&gt;
&lt;li&gt;installing the hostcd agent;&lt;/li&gt;
&lt;li&gt;one-off administrative operations;&lt;/li&gt;
&lt;li&gt;network or cloud orchestration;&lt;/li&gt;
&lt;li&gt;unsupported resource types;&lt;/li&gt;
&lt;li&gt;workflows that intentionally run only on demand.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A more practical division is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Ansible:
provision the machine and perform one-off orchestration

hostcd:
continuously defend the configuration that must remain true
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Both tools can coexist, but they should not manage the same resource at the same time.&lt;/p&gt;

&lt;p&gt;If Ansible writes a file every 15 minutes while hostcd continuously reconciles that file to a different value, the two systems will fight each other.&lt;/p&gt;

&lt;p&gt;Ownership must be explicit.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start with one small scope
&lt;/h2&gt;

&lt;p&gt;Do not begin by translating the largest production playbook.&lt;/p&gt;

&lt;p&gt;Choose:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;one to three non-critical hosts;&lt;/li&gt;
&lt;li&gt;one package;&lt;/li&gt;
&lt;li&gt;one configuration file;&lt;/li&gt;
&lt;li&gt;optionally one service;&lt;/li&gt;
&lt;li&gt;resources whose expected state is easy to verify.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In my pilot, I created an application called &lt;code&gt;ansible-migrated&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;It manages two resources on one Ubuntu host:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the &lt;code&gt;htop&lt;/code&gt; package;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/etc/ansible-demo.conf&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The application reports one of one hosts Synced and Healthy. Its reconciliation history records the accepted Git revision and the automated sync result.&lt;/p&gt;

&lt;p&gt;This is intentionally unimpressive. A migration test should be easy to understand and difficult to misinterpret.&lt;/p&gt;

&lt;h2&gt;
  
  
  A safe migration sequence
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Record the existing state
&lt;/h3&gt;

&lt;p&gt;Before changing ownership, record:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the playbook and role responsible for the resources;&lt;/li&gt;
&lt;li&gt;the current values on the target hosts;&lt;/li&gt;
&lt;li&gt;the cron or CI schedule;&lt;/li&gt;
&lt;li&gt;the expected rollback procedure;&lt;/li&gt;
&lt;li&gt;any variables or templates that affect the result.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The existing system remains the reference during the first comparison.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Describe the same state in hostcd
&lt;/h3&gt;

&lt;p&gt;Create the hostcd application and target only the selected hosts.&lt;/p&gt;

&lt;p&gt;Do not enable destructive behaviour until the preview matches expectations. Review the package, file, service, user, and other resource differences before applying them.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Install the agents
&lt;/h3&gt;

&lt;p&gt;The agents connect outbound to the control plane. Regular operation does not require opening inbound agent ports or allowing the control plane to SSH into every managed host.&lt;/p&gt;

&lt;p&gt;Ansible can remain responsible for installing the agent during this stage.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Compare without creating competing writers
&lt;/h3&gt;

&lt;p&gt;Run hostcd in a non-destructive or review-oriented mode first.&lt;/p&gt;

&lt;p&gt;Confirm that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the expected resources are discovered;&lt;/li&gt;
&lt;li&gt;the calculated differences are correct;&lt;/li&gt;
&lt;li&gt;the selected hosts are correct;&lt;/li&gt;
&lt;li&gt;no unrelated resource is included;&lt;/li&gt;
&lt;li&gt;secrets and generated files are handled appropriately.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  5. Remove overlapping Ansible ownership
&lt;/h3&gt;

&lt;p&gt;Once the desired states match, disable the relevant Ansible tasks for the pilot scope.&lt;/p&gt;

&lt;p&gt;Do not disable the entire playbook if only two resources are moving. Remove ownership incrementally.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Reconcile and verify
&lt;/h3&gt;

&lt;p&gt;Apply the accepted Git revision and verify:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;package state;&lt;/li&gt;
&lt;li&gt;file content and permissions;&lt;/li&gt;
&lt;li&gt;service state;&lt;/li&gt;
&lt;li&gt;application health;&lt;/li&gt;
&lt;li&gt;agent reconnect behaviour after restart.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The UI should report the application as Synced and Healthy, but the verification should also inspect the real host.&lt;/p&gt;

&lt;h3&gt;
  
  
  7. Introduce controlled drift
&lt;/h3&gt;

&lt;p&gt;For a non-critical test file, make a manual change on the host.&lt;/p&gt;

&lt;p&gt;Verify that hostcd:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;detects the difference;&lt;/li&gt;
&lt;li&gt;identifies the affected resource;&lt;/li&gt;
&lt;li&gt;reports the application as out of sync;&lt;/li&gt;
&lt;li&gt;restores the Git-managed value when self-heal is enabled;&lt;/li&gt;
&lt;li&gt;records the reconciliation result.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Do not run destructive drift tests against infrastructure anyone depends on.&lt;/p&gt;

&lt;h3&gt;
  
  
  8. Observe before expanding
&lt;/h3&gt;

&lt;p&gt;Keep the pilot small for several days.&lt;/p&gt;

&lt;p&gt;Watch for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;repeated false drift;&lt;/li&gt;
&lt;li&gt;package-manager behaviour;&lt;/li&gt;
&lt;li&gt;service restart loops;&lt;/li&gt;
&lt;li&gt;repository authentication failures;&lt;/li&gt;
&lt;li&gt;host reconnects;&lt;/li&gt;
&lt;li&gt;incorrect targeting;&lt;/li&gt;
&lt;li&gt;resources that still need to remain under Ansible.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Only then move the next scope.&lt;/p&gt;

&lt;h2&gt;
  
  
  What about rollback?
&lt;/h2&gt;

&lt;p&gt;With GitOps, the cleanest rollback is usually another Git revision.&lt;/p&gt;

&lt;p&gt;Revert the problematic commit, review the resulting difference, and reconcile the accepted revision.&lt;/p&gt;

&lt;p&gt;This keeps the desired state, approval history, and actual host state aligned.&lt;/p&gt;

&lt;p&gt;A UI-level rollback can be useful, but it needs a clear interaction with automated sync. If the application continuously follows &lt;code&gt;main&lt;/code&gt;, rolling back only the live host without changing the desired revision will cause the controller to move forward again.&lt;/p&gt;

&lt;p&gt;Rollback must change or temporarily override the desired target, not merely copy old files onto a machine.&lt;/p&gt;

&lt;h2&gt;
  
  
  Operational trade-offs
&lt;/h2&gt;

&lt;p&gt;Continuous reconciliation is not automatically better for every resource.&lt;/p&gt;

&lt;p&gt;It introduces an always-running agent and control plane. A bad desired state can be propagated continuously. Automated self-heal can undo an emergency manual change. The agent may require root privileges to manage operating-system resources.&lt;/p&gt;

&lt;p&gt;That means the system needs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;narrow targeting;&lt;/li&gt;
&lt;li&gt;dry runs and previews;&lt;/li&gt;
&lt;li&gt;approval gates for sensitive applications;&lt;/li&gt;
&lt;li&gt;audit history;&lt;/li&gt;
&lt;li&gt;per-host authentication;&lt;/li&gt;
&lt;li&gt;signed releases;&lt;/li&gt;
&lt;li&gt;backup and recovery procedures;&lt;/li&gt;
&lt;li&gt;an explicit emergency process for pausing reconciliation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The control loop is valuable only if its authority is bounded and observable.&lt;/p&gt;

&lt;h2&gt;
  
  
  When scheduled Ansible is enough
&lt;/h2&gt;

&lt;p&gt;Keep the existing approach when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the fleet is very small;&lt;/li&gt;
&lt;li&gt;configuration changes rarely;&lt;/li&gt;
&lt;li&gt;manual drift is not a meaningful risk;&lt;/li&gt;
&lt;li&gt;current-state visibility is unnecessary;&lt;/li&gt;
&lt;li&gt;the playbook is primarily provisioning;&lt;/li&gt;
&lt;li&gt;another monitoring system already provides sufficient evidence;&lt;/li&gt;
&lt;li&gt;operating an additional control plane would add more complexity than value.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A cron job is not inherently wrong. It becomes insufficient when the team starts building a second system around it to answer questions the playbook runner was not designed to answer.&lt;/p&gt;

&lt;h2&gt;
  
  
  The actual migration goal
&lt;/h2&gt;

&lt;p&gt;The goal is not to replace one YAML format with another.&lt;/p&gt;

&lt;p&gt;It is to move from:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;“The playbook succeeded this morning.”
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;“These hosts match this Git revision now.
This resource drifted.
This reconciliation corrected it.
This operator approved it.”
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For some teams, scheduled Ansible remains enough.&lt;/p&gt;

&lt;p&gt;For teams that need continuous evidence and automatic drift correction, the safest migration is not a rewrite. It is one package, one file, one host, and one clearly transferred ownership boundary at a time.&lt;/p&gt;

&lt;p&gt;The migration guide is available at:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://hostcd.dev/guides/ansible-cron-to-hostcd/" rel="noopener noreferrer"&gt;https://hostcd.dev/guides/ansible-cron-to-hostcd/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;hostcd itself is self-hosted and free for up to 10 hosts:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://hostcd.dev/" rel="noopener noreferrer"&gt;https://hostcd.dev/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>devops</category>
      <category>automation</category>
      <category>linux</category>
      <category>git</category>
    </item>
  </channel>
</rss>
