external api to get vars

hi all

i have a playbook containing multiple roles…
role1 should call external api and set the result from the api as “vars”
role2 should use those vars in their tasks

is this something we can achieve ??

Shan

yes

I’m about to build a similar playbook. Would you know of any examples you can point me to?