Hi,
Thanks for your help. I may be asking a simple question. I am new to ansible, so trying to learn.
This is what I need to understand.
Run the below
sql: select grantee FROM DBA_SYS_PRIVS where PRIVILEGE=‘INSERT ANY TABLE’ and grantee not like ‘SYS’ and grantee != ‘WMSYS’ and grantee != ‘DBA’ and grantee != ‘IMP_FULL_DATABASE’;
register: query_result
The query result will be the users in the DB has DBA_SYS_PRIVS and it can be more than one.I want to iterate the below task passing the username dynamically.
The query_result have to be iterated in the below
name: This playbook will grant or revoke privilges in the user.
oracle_privs:
user: “{{user}}”
password: “{{password}}”
service_name: “{{sname}}”
port: “{{prt}}”
hostname: “{{hostname}}”
privs: