For configuration and setup, see Playbook Documentation.
This sample playbook shows how to submit a job to run on the target z/OS systems via z/OSMF.
- name: sample of submitting a job to run on z/OS and check its return code hosts: job gather_facts: no collections: - ibm.ibm_zos_zosmf vars_prompt: - name: zmf_user prompt: "Enter your zOSMF username (skip if zmf_crt and zmf_key are supplied)" private: no - name: zmf_password prompt: "Enter your zOSMF password (skip if zmf_crt and zmf_key are supplied)" private: yes tasks: - include_role: name: zmf_job_complete vars: job_jcl_src: "files/job_sample_jcl.jcl" # The location of file or data set containing the JCL # job_jcl_location: 'LOCAL' # The type of location of the JCL to be submitted. Default is LOCAL # job_max_rc: 0 # The maximum return code for the job that should be allowed without failing the role. Default is 0 # complete_check_times: 10 # The maximum number of time that is used for periodic checks of the job status. Default is 10 # complete_check_delay: 5 # The interval time between periodic checks of the job status. Default is 5
To run the sample playbook, the inventory file hosts needs to be updated to identify the target z/OSMF end points.
For more details about role variables, see zmf_job_complete.