Hi,
How will I get only the sql statement from the json output ? I am
registering this as " register: query_result"
Here is my json output
"msg": {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python"
},
"changed": false,
"failed": false,
"msg": [
[
"Revoke EXECUTE on UTL_FILE from TESTACC1;"
],
[
"Revoke EXECUTE on UTL_FILE from TESTACC2;"
]
]
}
}
If I do
- local_action:
copy content={{query_result.msg}}
dest=/home/ansible/Playbooks/{{sname}}/sql/revoke.sql
I am getting
[["Revoke EXECUTE on UTL_FILE from TESTACC1;"], ["Revoke EXECUTE on
UTL_FILE from TESTACC2;"]]
I need to get this
Revoke EXECUTE on UTL_FILE from TESTACC1; Revoke EXECUTE on UTL_FILE from
TESTACC2;
--
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/2a69d90d-3ea8-4615-8f63-ace11f83c622%40googlegroups.com.