Add Host to host collection "prod" using Hammer
Hello,
How can I add Host to host collection "prod" using Hammer Command?
Regards,
MP
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
Your Red Hat account gives you access to your profile, preferences, and services, depending on your status.
If you are a new customer, register now for access to product evaluations and purchasing capabilities.
Need access to an account?If your company has an existing Red Hat account, your organization administrator can grant you access.
For your security, if you’re on a public computer and have finished using your Red Hat services, please be sure to log out.
Hello,
How can I add Host to host collection "prod" using Hammer Command?
Regards,
MP
Thanks, I figured it out.
Run Hammer command to find the Server ID’s
hammer --output csv host-collection hosts --name "{host_collection_name}" --organization "{ORG_NAME}" | grep –I {server_name}
Obtain the HOST ID
Then run following.
hammer host-collection add-host --host-ids {HOST_ID} --name host_collection_name --organization "ORG_NAME"
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
Here are the common uses of Markdown.
~~~
Code surrounded in tildes is easier to read
~~~[Red Hat Customer Portal](https://access.redhat.com)