So do our other rake tasks like generating assets. This puts a hard requires on the location of your Foreman checkout relative to this task and requires bundling within the Katello directory by the looks of it which is something we have strayed away from since the Foreman  should handle all of this for us. Looking this over, I'm not exactly sure what prevents this from being a rake task in Foreman that can be run by any plugin with arguments specific to the plugin. Not trying to make this more work for you - just trying to reduce duplication and centralize common elements across plugins.