- name: use ZOAU jsub to sumbit "{{pdse_member}}"
ansible.builtin.shell: jsub "{{pdse_member}}"
register: result
- name: result
ansible.builtin.debug:
var: result
- name: set job id variable for reuse.
ansible.builtin.set_fact:
job_id: "{{ result.stdout }}"
- name: get the job output
zos_job_output:
job_id: "{{ job_id }}"
register: result
until: result.jobs[0].ret_code.msg_code
retries: 5
delay: 10
Hello @U6crgb0 - I supplied that work around you shared above. Your support case had a playbook attached zos_special_char_workaround_2.yml , in that playbook the very last debug statement is not shown in your example above that would have printed out the full job log assuming the job completed within the 5 retries with a 10 second delay. For reference I will also include the contents of that playbook here.
To see the full job output, append this to your playbook:
- name: Result
ansible.builtin.debug:
var: result
The full playbook was:
---
- hosts: zvm
collections:
- ibm.ibm_zos_core
gather_facts: false
environment: "{{ environment_vars }}"
vars:
pdse_member: 'IMSTESTL.DIMATO.JCLCOPY(\$#JCLMEM)'
tasks:
- name: Use ZOAU jsub to submit "{{ pdse_member }}"
ansible.builtin.shell: jsub "{{ pdse_member }}"
register: result
- name: Result
ansible.builtin.debug:
var: result
- name: Set Job ID variable for reuse.
ansible.builtin.set_fact:
job_id: "{{ result.stdout }}"
- name: Get the Job output
zos_job_output:
job_id: "{{ job_id }}"
register: result
until: result.jobs[0].ret_code.msg_code
retries: 5
delay: 10
- name: Result
ansible.builtin.debug:
var: result
Hi , formatting with code tags makes easier to diagnose and sharing your playbook within source format tags as well.
Since I have not seen your playbook, I am assuming the error is that you have under indented keywords, review the example shared in the thread to see the proper alignment for the keywords below:
delay, register, retries,until
- name: Get the Job output
zos_job_output:
job_id: "{{ job_id }}"
register: result
until: result.jobs[0].ret_code.msg_code
retries: 5
delay: 10