Have the task with the loop to execute multiple sql files. but need to stop the execution of playbook using tag only after execution all the sql files. in reality the end_play is ending immediately after execution one sql file.
"
dlf_validation_sql_script " is a variable that provides the loop of multiple sql files to execute.
how can we keep the execution of task DLF validation until it complete the loop?
----------------------------------------------------------------------------------------------------------------------------------------------
- block:
- name: DLF validation
shell:
cmd: "{{sqlplus_cmd_dlf}} @{{dlf_validation_sql_script}} {{dof_validation_report_path}}"
chdir: "{{ dlf _sqlpath}}/{{folder_with_ dlf _sql_scripts | default('Scripts')}}"
register: validation
async: "{{timeouts. dlf _validation}}"
poll: "{{timeouts.poll}}"
environment:
- "{{env}}"
- SQLPATH: "{{ dlf _sqlpath}}"
- PATH: "{{env.ORACLE_HOME}}/bin:{{ansible_env.PATH}}"
- debug: msg="{{validation.stdout | to_yaml | replace('\n\n', '\r')}}"
- name: Ending the DLF validation before obfuscation step
meta: end_play
tags: validation