I used to have some playbooks that did the same, with the first task calling the API and retrieving the token into a registered var, while subsequent tasks using that var as input for authentication/authorization:
- get_url: ... register: auth_token - access_api: token: auth_token.body/header/etc -- ---------- Brian Coca (he/him/yo) -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CACVha7eis6TT7XXNRJUMp5o%2B72Md8S9_0ZFG13HFUEFraVy40Q%40mail.gmail.com.