Wills for Irish soldiers in the British Army from WW1 can be found in the national archives:
I have just discovered this set of records. Scans of actual documents available. I never could find any for English relative who died WW1 and none of the Irish relatives who joined up died.
It is only for the men who died & I am not sure if it's comprehensive.
A cousin of my great-grandfather died in Gallipoli and his will is not there. However, he was a soldier before WW1 so I don't know if that makes a difference.
Genealogy Forum Mod
I suppose it was an optional thing for them to do.
It wasn't optional. All soldiers had a pocket book and they were supposed to fill out the will page (which is where these images come from). However, it's probably the case that if a body wasn't recovered, they didn't have the book either.