The problem has been solved by installing the centos-release-ansible-29.noarch package as a prerequisite on a fresh OS install.
All thanks to @gyokiss: [ERROR ] [configure] /usr/sbin/foreman-rake db:migrate' returned 1 instead of one of [0] - #7 by gyokiss