Foreman-installer -i fails with foreman-rake-db:migrate]/returns: change from 'notrun' to ['0'] failed:

This is a known problem. I posted a workaround in Enabling ansible plugin results in failure of db:migrate - #7 by Dirk and Ondrej posted the actual fix one post later. The fix should be available soon with 3.1.2 and 3.2.0.