Skip to content

Add a command to reset the Ansible fact cache #2388

@berendt

Description

@berendt

Category: feature | Scope: Small

Description

Add an osism command that clears the Ansible fact cache so operators can remove stale or incorrect facts. By default the command flushes the entire cache. A parameter restricts the operation to selected hosts or groups when an operator wants to reset only part of it.

The command only clears the cache. It does not start a new fact-gathering run; the cache rebuilds on the next Ansible run that collects facts.

No confirmation prompt is needed. The operation is destructive but low-risk, since the cache is rebuilt automatically.

Motivation

Operators troubleshooting a deployment need a clean way to drop cached facts. Stale or wrong facts can make Ansible act on outdated information about a host, producing confusing results that are hard to diagnose. There is no direct command to clear them today, so an operator has to locate and remove the cache by hand.

A dedicated command turns this into a single, predictable step. Restricting the reset to specific hosts or groups keeps the rest of the cache intact when only one host misbehaves.


Drafted by planwerk-review with Claude

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

Status
In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions