Opensearch node repurpose

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
OPewnsearch 3.0.0

Describe the issue:
I have nodes that are :
node.roles: [ cluster_manager, data ]

I want to remove the data role

I have read about a mythical thing and opensearch-node tool. but i cant seem to locate said tool.

if there a process i can follow?

Yes it have shards on the file system i am still in build so destroying the data is an option.
But i think there is a clearner way.

@GuyS The opensearch-node tool exists and is located in /usr/share/opensearch/bin folder.

[opensearch@e05867a825e8 ~]$ ./bin/opensearch-node --help
A CLI tool to do unsafe cluster and index manipulations on current node

Commands
--------
repurpose - Repurpose this node to another cluster-manager/data/warm role, cleaning up any excess persisted data
unsafe-bootstrap - Forces the successful election of the current node after the permanent loss of the half or more cluster-manager-eligible nodes
detach-cluster - Detaches this node from its cluster, allowing it to unsafely join a new cluster
override-version - Overwrite the version stored in this node's data path with [3.1.0] to bypass the version compatibility checks
remove-settings - Removes persistent settings from the cluster state
remove-customs - Removes custom metadata from the cluster state

How did you deploy your cluster?

If you don’t care about the data, you can try these steps.

  1. Exclude the node from routing allocation. This will evict all of the shards to other remaining nodes.
PUT _cluster/settings
{
  "transient": {
    "cluster.routing.allocation.exclude._name": ""
  }
}
  1. Stop the node
  2. Delete data folder
  3. Change role to cluster_manager only
  4. Start OpenSearch node.
  5. Remove the node from the exclusion list.

thank you for the assist