On Thu, 13 Feb 2020 08:32:08 -0800 (PST)
Anand Solomon <anand.v.solo...@gmail.com> wrote:

> sql works fine actually. No issues with that. I am getting the query 
> results. Here is the result
> 
>     "msg": {
>         "changed": false,
>         "msg": "All items completed",
>         "results": [
>             {
>                 "ansible_facts": {
>                     "discovered_interpreter_python": "/usr/bin/python"
>                 },
>                 "ansible_loop_var": "item",
>                 "changed": false,
>                 "failed": false,
>                 "invocation": {
>                     "module_args": {
>                         "host": 
> "tstdb.cdst2lsongoi.us-east-1.rds.amazonaws.com",
>                         "hostname": 
> "tstdb.cdst2lsongoi.us-east-1.rds.amazonaws.com",
>                         "mode": "normal",
>                         "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
>                         "port": "1521",
>                         "script": null,
>                         "service_name": "tstdb",
>                         "sql": "select name from v$database;",
>                         "user": "DBUSER",
>                         "username": "DBAUSER"
>                     }
>                 },
>                 "item": {
>                     "key": "Script1",
>                     "value": "select name from v$database;"
>                 },
>                 "msg": [
>                     [
>                         "TSTDB"
>                     ]
>                 ]
>             }
> 
> [...]
> How do I capture only the query result which is just the username ?

> >
> >       - name: Script will revoke 
> >         oracle_sql: 
> >           username: "{{ user }}" 
> >           password: "{{ password }}" 
> >           service_name: "{{ sname }}" 
> >           port: "{{ prt }}" 
> >           sqlId: "{{ hostnme }}" 
> >           sql: "{{ item.value }}' 
> >         loop: "{{ scripts|dict2items }}" 

I don't understand what "the query result which is just the username" means.
What result do you expect?

-- 
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/20200213181659.1dbb9fc0%40gmail.com.

Attachment: pgp8c5myS0sfH.pgp
Description: OpenPGP digital signature

Reply via email to