As the Puppet documentation states regarding roles, in rules (https://puppet.com/docs/pe/2017.2/r_n_p_full_example.html#the-rules-for-role-classes), the only thing roles should do is declare profile classes with the puppet include keyword. That is, they don't themselves have any class parameters. Roles also shouldn't declare any component classes or resources—that's the purpose of profiles.
Constructing roles only with the include keyword
Get Mastering Puppet 5 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.