German Chancellor Angela Merkel’s bloc and the Social Democratic Party have agreed on the ministries each will get in a coalition government, people familiar with the matter said.