Ruthenium catalysis instead of copper gives 1,5-substituted triazoles. Alcohols can be directly converted to hazides under Mitsunobu conditions. Additional step: substitution of halogen or hydroxy group (Mitsunobu) with azide. Stereochemistry at secondary halides/alcohols need to be considered.
SMARTS: [CH0;$(C-[#6]):1]#[CH1:2].[C;H1,H2;A;!$(C=O):3]-[*;#17,#35,#53,OH1]>>[C:1]1=[C:2]-N=NN(-[C:3])-1