I think Kai's suggestion is correct, don't know much about your specific use case, but I've had similar issues looping with return values. The reason is on there first check the call hasn't been made yet and "results" won't exist you're right, but on subsequent calls within that loop it will, so that extra clause should fix that error.
On Fri, Sep 6, 2019, 7:52 AM Cade Lambert <[email protected]> wrote: > Yeah, it's not defined because it's not a value that's returned when the > API call is sent. I'm not sure there's a way to do what I'm trying to do > with a loop. > > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/2ec91a91-ced2-4c58-9380-b343b6b3acf8%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/2ec91a91-ced2-4c58-9380-b343b6b3acf8%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAKEXu87eXZ-Xf6B5v1wa%3DTGbDPLhG9ADvi%3Duoo32Kd4%2B%3DWZ7zg%40mail.gmail.com.
