Content-host IP Information
I'm using Satellite 6.1.9, and have a content host that is not running Puppet and is not listed under Hosts. When viewing the information for this content-host, there is a Networking section that provides the IP information for the interfaces on the server.
I'd like to be able to retrieve this information in an automated manner. Is it accessible using the Hammer CLI or the APIs directly? I'd even be happy just to know where it is stored in the Foreman database so I could query it myself.
Thanks for any assistance!
Responses
You can retrieve this via the API
# define an API user
APIUSER=admin
# define the API user's password
APIPASS=supersecret
# set UUID for the content host
UUID=83eff36d-21b7-4f7b-9299-23a1b8bf13d2
curl -k -u $APIUSER:$APIPASS "https://satellite.example.com/katello/api/v2/systems/${UUID}?fields=full"
This information will be in JSON format, so you'd might want to pipe this output to the json_reformat command to make it easier to read.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
