You can register hosts with {Project} using the host registration feature in the {ProjectWebUI}, Hammer CLI, or the {Project} API. For more information, see {ManagingHostsDocURL}Registering_Hosts_managing-hosts[Registering Hosts] in {ManagingHostsDocTitle}.
-
In the {ProjectWebUI}, navigate to Hosts > Register Host.
-
From the Activation Keys list, select the activation keys to assign to your host.
-
Click Generate to create the registration command.
-
Click on the files icon to copy the command to your clipboard.
-
Connect to your host using SSH and run the registration command.
-
Ensure that the appropriate repositories have been enabled:
-
Generate the host registration command using the Hammer CLI:
# hammer host-registration generate-command
If your hosts do not trust the SSL certificate of {ProjectServer}, you can disable SSL validation by adding the
--insecure
flag to the registration command.# hammer host-registration generate-command \ --insecure true
-
Connect to your host using SSH and run the registration command.
-
Ensure that the appropriate repositories have been enabled:
-
Generate the host registration command using the {Project} API:
# curl -X POST https://{foreman-example-com}/api/registration_commands \ --user "My_User_Name" \ -H 'Content-Type: application/json'
If your hosts do not trust the SSL certificate of {ProjectServer}, you can disable SSL validation by adding the
--insecure
flag to the registration command.# curl -X POST https://{foreman-example-com}/api/registration_commands \ --user "My_User_Name" \ -H 'Content-Type: application/json' \ -d '{ "registration_command": { "insecure": true }}'
To enter a password as a command line argument, use
username:password
syntax. Keep in mind this can save the password in the shell history. Alternatively, you can use a temporary personal access token instead of a password. To generate a token in the {ProjectWebUI}, navigate to My Account > Personal Access Tokens. -
Connect to your host using SSH and run the registration command.
-
Ensure that the appropriate repositories have been enabled: