// Module included in the following assemblies:
//
// * machine_management/adding-rhel-compute.adoc
// * post_installation_configuration/node-tasks.adoc

:_content-type: PROCEDURE
[id="rhel-adding-node_{context}"]
= Adding a RHEL compute machine to your cluster

You can add compute machines that use Red Hat Enterprise Linux as the operating system to an {product-title} {product-version} cluster.

.Prerequisites

* You installed the required packages and performed the necessary configuration on the machine that you run the playbook on.
* You prepared the RHEL hosts for installation.

.Procedure

Perform the following steps on the machine that you prepared to run the playbook:

. Create an Ansible inventory file that is named `/<path>/inventory/hosts` that defines your compute machine hosts and required variables:
+
----
[all:vars]
ansible_user=root <1>
#ansible_become=True <2>

openshift_kubeconfig_path="~/.kube/config" <3>

[new_workers] <4>
mycluster-rhel8-0.example.com
mycluster-rhel8-1.example.com
----
<1> Specify the user name that runs the Ansible tasks on the remote compute machines.
<2> If you do not specify `root` for the `ansible_user`, you must set `ansible_become` to `True` and assign the user sudo permissions.
<3> Specify the path and file name of the `kubeconfig` file for your cluster.
<4> List each RHEL machine to add to your cluster. You must provide the fully-qualified domain name for each host. This name is the hostname that the cluster uses to access the machine, so set the correct public or private name to access the machine.

. Navigate to the Ansible playbook directory:
+
[source,terminal]
----
$ cd /usr/share/ansible/openshift-ansible
----

. Run the playbook:
+
[source,terminal]
----
$ ansible-playbook -i /<path>/inventory/hosts playbooks/scaleup.yml <1>
----
<1> For `<path>`, specify the path to the Ansible inventory file that you created.
