How to render a template for a provisioned host in satellite 6 using API call

Solution Verified - Updated -

Environment

  • Red Hat Satellite 6.6
  • Red Hat Satellite 6.5
  • Red Hat Satellite 6.4

Issue

  • Render a template for a provisioned host in satellite 6 using API call

Resolution

1) Use the API call to list the template kinds :

 "template_kinds": {
            "List all template kinds": "/api/template_kinds"
        }
# curl --user USER:PASSWORD https://SATELLITE-FQDN/api/template_kinds | json_reformat
  • Available template kinds :

Bootdisk,PXELinux,PXEGrub,PXEGrub2,iPXE,provision,finish,script,user_data,ZTP,POAP,cloud-init,kexec

2) Render a template for a provisioned host :

# curl --user USER:PASSWORD https://SATELLITE-FQDN/api/hosts/[HOST-ID]/template/[TEMPLATE KIND NAME] | json_reformat  | sed 's/\\n/\n/g'

For more KB articles/solutions related to Red Hat Satellite 6.x API Issues, please refer to the Red Hat Satellite Consolidated Troubleshooting Article for Red Hat Satellite 6.x API Issues

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments