[HOW TO] Business rule on validation host

Hi all,

When I create an host I would like to add a rule to validate if a host has a puppetclass.

To do that what is the best ?

  1. Create an hook
  2. Develop a foreman plugin

Could you give me an example or github project to do that ?

Best Regards.

Perhaps extending the https://github.com/theforeman/foreman_host_extra_validator plugin is appropriate? Right now it only supports hostname checking - @TimoGoebel would this be a good fit?

You are right. I have seen after this plugin and I have implemented my own plugin.
Thanks you for your reply.

1 Like