I am running Katello 3.10 and would like to create an automated action/script that will execute only when a new host subscribes to Katello via an activation key.
In more detail what I am trying to do is this:
- New host is subscribed to Katello via an activation key. (We do not use Foreman/Katello to deploy servers or I would add it in the deployment.)
- Right now when a new host is subscribed its placed in a Host Group.
- In addition to the above I would like an action to happen to call an external (to Foreman) script.
- The script (already written) takes the hostname as input. Does some work on it and then adds the host to our Vulnerability Management Scanner for monthly scanning.
What is the best way to perform this in Foreman/Katello? And how hard is it?