It seems that to get it to prompt where you want, you'd really need a "vars_prompt" kind of task.
In this case, while pause does this, I like playbooks to be explicit.
How about making an action plugin called "prompt" ?
Then it would be easy to do this, and while prompt would also pause, it might be more explicit as you could insert this where you needed to go.
I accepted the patch to save the input to the pause module because it's a one-liner, but I don't think we need to make it standard.
I think the "prompt" module would be a combination of ideas from both "pause" and "set_fact", something of a hybrid.
This way you would also not need to use register with it.
Maybe like
prompt: variable=foo prompt="enter the self destruct code for {{x}}" ?
I think for most people vars_prompt is sufficient, but I like the idea that it would be a regular action. OTOH, there's a lot of stuff about secrets and password re-entry in vars prompt that probably aren't going to be duplicated here -- and maybe should be. Moving them into common functions might be advisable.
--Michael