I'd use a combination of foreman_hooks and an external process. Changing node.rb will be obfuscation at best and you will risk losing your edits on an upgrade.
foreman_hooks are great and (generally) work well. Be careful of any update hooks you have which trigger and update - you'll find yourself in a recursive nightmare (update triggers a hook which makes and update which triggers the hook....). Great think about hooks is you can have various actions base against what happens to the host. For example, we use a destroy hook to clean AD entries and set CMDB entries when a host is removed etc. Personally, to scrape a CMDB and set permissions etc I'd probably look at an external API based script and batch this. Just my view... -- You received this message because you are subscribed to the Google Groups "Foreman users" group. To unsubscribe from this group and stop receiving emails from it, send an email to foreman-users+unsubscr...@googlegroups.com. To post to this group, send email to foreman-users@googlegroups.com. Visit this group at https://groups.google.com/group/foreman-users. For more options, visit https://groups.google.com/d/optout.