Delete VM from Foreman during retirement

Posted by cjung on Tue, Jun 2, 2015

ManageIQ is covering the full life cycle of a virtual machine or service. This includes the eventual retirement of resources. If you’re using my script to register a virtual machine in Foreman, you might want to delete the Foreman records during retirement.

A wrote a little script to do that, which can be found on GitHub.

To use the script, you can either re-use one of the existing states of the VM Retirement state machine, or add an additional one. The script requires the same attributes already described and documented in the previous article.