Hi,
What is the best way to loop the below KEY : VALUE ?

*main.yml*
 
 var_files:
 - /home/ansible/sqlvar.yml
 
 - name: Script 
 oracle_sql:
 sql: {{Value}}
 environment: "{{oracle_env}}"
 register: query_result
 connection: local
 
 - name: Runs statements 
 command: $ORACLE_HOME/sqlplus -s {{user}}/{{password}}@{{sname}} 
@/home/ansible/Playbooks/{{sname}}/sql/{{Key}}_revoke.sql
 environment: "{{oracle_env}}"
 register: sqloutput
 connection: local
 
 ------
 sqlvar.yml
 
 Key: Value
 Script1: select username from dba_users;
 Script2: select file_name from dba_data_files;
 Script3: select name from v$profile;
 Script4: select username from dba_profile;

-- 
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/61eb0fae-6370-42ec-bfb4-841dfb244a6d%40googlegroups.com.

Reply via email to