How do I match an object's rotation based on the other object's face's rotation? How do I get this cylinder to match the rotation of the selected face?

I want to do something similar as shown in the 2nd image:
You can select the face you want the cylinder aligned to and then press Shift+Numpad 7. this will align the view to the face in a top down perspective. 

Afterwards you can create a cylinder with the checkbox "align to view" selected. 

In this case it is also good to know, that you can create a Custom Transformation orientation with pressing Ctrl+Alt+Space while selecting the face.