If you get more verbose, you the the output with STDOUT and STDOUT_LINES. STDOUT_LINESis the closest you get for what you're after. May be callback_plugin may help... not sure, never tried that.
Cheers, *Kosala* On Mon, May 15, 2023 at 6:24 PM Veera <[email protected]> wrote: > Hello, > > While i try to grep/cut the url from my below debug output , I am unable > to get the exact output. I tried with split, dict2items ,item2dicts to > break it and grep the exact line . > > TASK [debug] > ************************************************************************************************************************************* > Monday 15 May 2023 09:10:06 +0300 (0:00:00.027) 0:00:02.906 > ************ > ok: [localhost] => { > "msg": "export OS_AUTH_URL=https://mydomain.net:9001/v3\nexport > OS_PROJECT_ID=abcdefghijklmnopqwertyuu\nexport OS_PROJECT_NAME=\" > my_project\"\nexport OS_USER_DOMAIN_NAME=\"Default\"\nif [ -z \" > $OS_USER_DOMAIN_NAME\" ]; then unset OS_USER_DOMAIN_NAME; fi\nexport > OS_PROJECT_DOMAIN_ID=\"default\"\nif [ -z \"$OS_PROJECT_DOMAIN_ID\" ]; > then unset OS_PROJECT_DOMAIN_ID; fi\nunset OS_TENANT_ID\nunset > OS_TENANT_NAME\nexport OS_USERNAME=\"my_project\"\nexport > OS_INTERFACE=public\nexport OS_IDENTITY_API_VERSION=3" > } > > > > I need only the string "https://mydomain.net:9001/v3" > from the above debug output as a variable for my next play . > > > > > -- > 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/7bc37be6-dd57-47c4-b634-54cb521489b5n%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/7bc37be6-dd57-47c4-b634-54cb521489b5n%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/CAP7S5HYK6Jj2LjqO5d3%2Bk5TBAShQgmz3zS%3DwKPa9PJriOOjOrw%40mail.gmail.com.
