I have static hosts, in my all.yml group_vars, I have some variables that I want to generate from an REST API's response. I can use uri module in task and register the variables for the play, but I think it calls the api for every host.
But I want to create the variables by calling the api only once at the start of the play, so it can be used by all hosts. How can I do that?