I agree, it would be useful to cut this repetition down, but let's get this merged as-is. I've logged http://projects.theforeman.org/issues/4428 to track the refactoring.