handlebar light (or mount) with ball and socket joint
Philips Saferide came with a ball and socket mount. The light has been discontinued though. Possibly you can get replacement mounts and adapt them: Philips page for holder.



Personally I'd look for something that uses a rubber strap to hold it onto the handlebar, loose enough that you can move it to point up and down, but tight enough to stay stable when moved. Adjusting the Philips ball and socket to work that way, instead of setting aim once and then tightening to lock, could be tricky.