diff --git a/cmd/fleet/handleAck.go b/cmd/fleet/handleAck.go index bb85584be..bdf1d7ade 100644 --- a/cmd/fleet/handleAck.go +++ b/cmd/fleet/handleAck.go @@ -194,6 +194,7 @@ func _handleUnenroll(ctx context.Context, bulker bulk.Bulk, agent *model.Agent) updates := make([]bulk.BulkOp, 0, 1) now := time.Now().UTC().Format(time.RFC3339) fields := map[string]interface{}{ + dl.FieldActive: false, dl.FieldUnenrolledAt: now, dl.FieldUpdatedAt: now, } diff --git a/internal/pkg/dl/constants.go b/internal/pkg/dl/constants.go index aa5cab75e..b585af688 100644 --- a/internal/pkg/dl/constants.go +++ b/internal/pkg/dl/constants.go @@ -31,6 +31,7 @@ const ( FieldPolicyRevisionIdx = "policy_revision_idx" FieldPolicyCoordinatorIdx = "policy_coordinator_idx" + FieldActive = "active" FieldUpdatedAt = "updated_at" FieldUnenrolledAt = "unenrolled_at" )