Assign a system using:
The system is registered for subscriptions and insights:
rhc connectAdd the system to the template from the Template System's page
Or with the following curl command from the system itself:
API TBD
curl -X POST https://console.redhat.com/api/patch/v1/templates/$UUID/assign/ --cert /etc/pki/consumer/cert.pem --key /etc/pki/consumer/key.pamRegistered for subscriptions via:
rhc connector
subscription-manager register curl -O /etc/yum.repos.d/template.repo https://console.redhat.com/api/content-sources/v1/templates/$UUID/config.repo --cert /etc/pki/consumer/cert.pem --key /etc/pki/consumer/key.pamNote that adding or a removing a repository from the template will not be reflected on the client until this file is redownloaded.
Registered for subscriptions via:
rhc connector
subscription-manager registeror using the rhc ansible module
- hosts: all
tasks:
- name: Download template.repo ansible.builtin.get_url: url: https://console.redhat.com/api/content-sources/v1/templates/$UUID/config.repo dest: /etc/yum.repos.d/template.repo mode: '0444' client_cert: /etc/pki/consumer/cert.pem client_key: /etc/pki/consumer/cert.key