How to add a flexible database role to a database?
You need to do the user/role mapping per database. 

So you create an AD group and add that as a login on the server

Within the database you define a role and set permissions for the role. Then you need to add the AD Group login as a user to the database and set them as a member of the database role. Each role can have multiple members so you can add many groups as members of the role.

You can also map the users to a server role and then add the server role as a user in the database and make that member of a database role. 

Robin Page has a simple explanation on simple talk and it's all explained in details in multiple details in many StackExchange answers