Elastic workflow keeps Linux endpoint configs current while avoiding duplicate actions
A 68-line Elastic workflow can keep every Linux endpoint's configuration up to date without creating duplicate actions on offline hosts.
Systems Elastic Security Labs 29 Sep 2026 Method Deployed evidence
Published as “No MDM for Linux? A 68-line Elastic workflow keeps every endpoint's config current”
Why it matters
Provides a low-code, in-product way to keep Linux endpoint configurations synchronized without additional MDM tools.
Summary
The authors built a 68-line YAML Elastic Workflow that runs every six hours, lists Linux endpoints, checks for pending run-script actions with a specific script ID, and only queues a new action if none is pending. This prevents duplicate actions on hosts that are offline for extended periods. They validated the pattern on Elastic Stack 9.5.1 in production, using it to deploy Codex and Cursor configuration files across their Linux fleet.
What they found 2
- Offline hosts receive only one queued action per week instead of multiple duplicates.
“A laptop that enrolls tomorrow gets picked up on the next pass, and a host that's offline for a week ends up with one queued action instead of 28.”
- Queued actions expire after two weeks, ensuring stale requests are refreshed.
“Action requests expire after two weeks, so a laptop that stays dark longer than that will be issued a fresh action rather than an infinitely aged one.”
Caveats 7
- The distro allowlist fails silently, so hosts with unlisted distributions never receive the deployment.
- The endpoint query currently fits the entire fleet on one page; pagination will be required as the fleet grows.
- Secrets embedded in scripts are visible to anyone with Elastic Defend Scripts Management privileges.
- Pagination will be needed when the endpoint query exceeds one page.
- The distro allowlist silently excludes unsupported Linux distributions.
- Custom scripts are privileged code and require review before fleet deployment.
- Secrets stored in the script library are accessible to users with script management rights.
What’s new here 4
- A concise 68-line YAML workflow that reconciles configuration state via Elastic Defend response actions.
- Built-in deduplication logic that skips hosts with a pending action of the same script ID.
- Operates entirely within Elastic Stack, eliminating the need for external schedulers or MDM for Linux.
- Reusable pattern that can be retargeted to any configuration by changing the KQL query and script ID.