When I provision or remove hosts within Foreman+Katello+Ansible, I don’t know how to perform additional one-off tasks on other hosts to finalize the provisioning/removal.
When I provision a host within Foreman+Katello+Ansible, I need to perform a few additional manual tasks on other hosts:
- Add the host to my LibreNMS monitoring system.
- Add the host to my NFSen collector.
- Add manual DHCPv6 reservations (until ISC DHCPv6 OMAPI supports IPv6 and Foreman supports that).
Likewise, if I am removing the host I need to perform similar removal steps like those above (replacing “add” with “remove”). Ideally, this could be done via one-off Ansible tasks within Foreman itself. For example, once a host is provisioned, an Ansible task is executed against the LibreNMS server to add the host to monitoring. I’m curious, however, what other people do in these particular scenarios or whether Foreman+Ansible supports this and I’m just not seeing in documentation how to accomplish it.
Foreman and Proxy versions:
Foreman and Proxy plugin versions:
Distribution and version:
CentOS 8 Stream
Other relevant data: