My findings so far
The template snippet “subscription_manager_setup” is meant to install the subscription manager, but doesn’t add the Atix repository. This snippet is called by “global_registration”, before registration is attempted. I haven’t tried Ansible yet, but my concern is that the Ansible role won’t run until after Global Registration has completed and I’d like to keep customisation to a minimum.
The only way I’ve been able to get the subscription manager repo deployed at host build time has been by using the following late-commands:
- echo "deb https://oss.atix.de/Ubuntu24LTS/ stable main" >> /target/etc/apt/sources.list.d/client.list
- curl --silent --show-error --output /target/etc/apt/trusted.gpg.d/client.asc https://oss.atix.de/atix_gpg.pub
#- echo "deb [trusted=yes] https://foreman.local/pulp/content/Org/Library/custom/Ubuntu_Sub_Client/Ubuntu24/ default all" >> /target/etc/apt/sources.list.d/client.list
- curtin in-target -- apt update
Using the public (subscription-manager) Atix repo works for adding the repo (I’m primarily focused on Ubuntu 24.04). But for some reason, Global Registration doesn’t then install the subscription-manager. I have a hunch that Global Registration happens before the late-commands are executed, but don’t know this for sure, nor do I know how to troubleshoot the Global Registration template.
Using a local repo fails because curtin won’t accept the [trusted=yes]
option; GPG keys may need to be added to pulp to get that working.