Any time the oven's on 180 degrees anyway, and you have a head or two of garlic about the place, you can pop them in to roast. When they're done, unpeel the cloves, put them in a clean jar, and cover them with olive oil. Voila: roasted garlic whenever you need it, kept safe under the oil, plus roast-garlic-infused olive oil. (Every time you use the oil, top it up with some more.)
Grab the garlic heads and a lovely sharp knife.
Cut the hairy bases off so they can stand up nicely.
Cut the tops off as well, to expose all the cloves. (You can use the clove-tip offcuts for something else you're cooking with garlic.)
Dribble olive oil into the heads, filling all the little gaps and letting it soak down.
They end up in a puddle of oil as well, but that's fine.
Pop them in the oven at 180 degrees for 30 minutes. There was something else going into this oven as well, but I forget what.
If you want your jar to be really, really clean, put the clean washed jar in the oven as well.
After half an hour, take them out and let them cool down.
Once they're cool, they're quite easy to unwrap into whole cloves. Some people say squeeze them out, but that ends up mushy and messy, when I do it. I find it easier to go in the sides, tearing / slicing open the white skin, and opening the little doorway for each clove.
Pop the cloves in a super-clean jar, not full to the top.
Fill the jar up with oil, so all the cloves are covered. I use a long-handled teaspoon to get them closer together and release any air-bubbles. Touching air makes stuff go off, so we don't want trapped air.
I fill a 250ml jar with oil, cloves all hanging out at the bottom, so I get plenty of garlic oil. I'll fish out the cloves as I want them for cooking, and use splashes of the oil for frying kale, salad dressing, dressing cooked veg, etc. Each time I use the oil, I top it up again.