I had a little trouble using the ‘Install Roles and Features’ action in SCCM task sequences. When installing certain roles, the TS would fail. The problem turned out to be that the TS action cannot properly stage reboots, so when you try to install certain combinations of roles and features using a single action, the TS fails.
The workaround is to use multiple ‘Install roles and Features’ actions. You’ll have to play around to see what combinations work well for you.