Looking up Activation Key in job or report templates

I’ve been banging my head on trying to code this. In a job or report template, how do you look up the activation key used to register a host with Foreman/Katello?

I can lookup timestamp and host registered easily, but not the activation key used.

Looking at the content host page for said host, the activation key is reported there, so there is obviously some way to do this.

Can the method used be utilized in job or report templates?

Thank you.

Hi @frostygresh

The method is host.activation_key_names or host.activation_keys. But you’re right that you can’t use it in report templates (with safe mode turned on, at least.) In order to work it would require a code change here.

To file an RFE (feature request), open a Redmine in Katello and use “Feature” as the tracker: