Install Tracer upon new host registration

Problem:
When I register a new content host using “curl ... | bash”, I need to manually add Tracer to every host, because I want Tracer to run on all hosts.
This procedure is weak, because an operator may forget to install Tracer.

Expected outcome:
Is there a way to automatically install Tracer upon host registration?
e.g. by using “Activation Keys” or extending the curl command?

Foreman and Proxy versions:
3.5.1

Foreman and Proxy plugin versions:
katello 4.7.1
foreman-tasks 7.1.1
foreman_remote_execution 8.2.0

Distribution and version:
Rocky Linux 8.7

Just look into the templates. The standard “Linux host_init_config default” template checks for host parameter redhat_install_host_tracer_tools. If it’s true, it installs katello-host-tools-tracer.

1 Like

Yes, this is exactly what I was missing - thank you!

I figured out that altering the template is not a good idea in this case.
As I need Tracer on all hosts (like some kind of global “policy”), I managed to add a Global Parameter, setting “redhat_install_host_tracer_tools” to “true”.

During execution of the “curl ... | bash” registration, the Tracer client component gets immediately installed.

1 Like

I would alter templates only if necessary. But looking at the template source helps to find options which are not well (or not at all) documented.

You can set it on any level: global, hostgroup or host, depending on what you need.

2 Likes

See also Foreman documentation: Enabling Tracer on a Host.

1 Like

Thanks for adding the link.

Unfortunately, the official documentation doesn’t answer (yet) what is being asked in this topic.