No. For Ryzen you need a mainboard with AM4 socket and corresponding chipset and not LGA 1151 socket. You can usually find a compatibility list of supported CPU's on the manufacturer's support page.
PS: For example, for 2nd generation Ryzen you need a motherboard with AM4 socket and 400 series chipset (e.g. B450 or X470). For example, the following product:
ASUS X470-F + Ryzen 7 2700X (AM4, AMD X470, ATX)