Giter VIP home page Giter VIP logo

ibm_zos_zosmf's Introduction

IBM z/OS Management Facility Collection

This collection has been slated for deprecation and will no longer be updated or supported.

Components related to Workflows and Cloud Provisioning and Management have been migrated to the new ibm_zosmf collection in Galaxy and Ansible Hub. If you would like to see specific new functionality added to this collection please reach out to [email protected] and [email protected].

For solutions involving z/OS job, data set, USS file and command operations IBM recommends that clients use the ibm_zos_core collection.

IBM z/OS Management Facility (z/OSMF) Collection, referred as ibm_zos_zosmf, consists of modules and roles that you can use with z/OS.

IBM z/OSMF collection intends to allow Ansible to drive z/OS operations via z/OSMF RESTful services, such as z/OS jobs REST services, z/OS console REST services, z/OS data set and file REST services etc.

Features

IBM z/OSMF collection includes modules, roles, sample playbooks and ansible-doc to automate tasks on z/OS.

For guides and reference, see Docs Site.

For a quick approach to set up z/OSMF dependencies for z/OSMF collection ibm_zos_zosmf, please refer to here.

Check out the sample Ansible playbooks for automating 3 different z/OS use case here.

If you want to use z/OSMF Workflow or CP&M functions, please use ibm_zosmf collection.

Copyright

© Copyright IBM Corporation 2020

License

Some portions of the collection are licensed under GNU General Public License, Version 3.0, and other portions of the collection are licensed under Apache License, Version 2.0. See individual files for applicable licenses.

Author Information

IBM z/OSMF collection is maintained by the IBM z/OSMF development team. For more information about z/OSMF, see IBM z/OSMF One Stop Hub.

ibm_zos_zosmf's People

Contributors

freemanlatrell avatar imgbotapp avatar qi-xg-li avatar scottshuffler avatar shreeji818 avatar stevemar avatar viane avatar zosmf-robyn avatar zosmf-young avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ibm_zos_zosmf's Issues

Can't set workflow_host in zmf_workflow_complete role

Hi all,

In ibm_zos_zosmf/roles/zmf_workflow_complete/tasks/main.yml

Lines 16 and 63:
workflow_host: "{{ inventory_hostname | default() }}"

This prevents me to override the workflow_host variable when using the role.
Should this not be workflow_host | default() with defaulting to inventory_hostname?

Kind regards,
Tobias

Deploying CICS application playbook fails with file not found error

(https://github.com/IBM/ibm_zos_zosmf/blob/master/playbooks/sample_role_deploy_cics_application.yml)

sample_role_deploy_cics_application playbook fails with the below error

TASK [cics_wlp_install_app : Install CICS application - Write application binary to USS file] ****************************************************************
Wednesday 01 July 2020  01:24:32 -0400 (0:00:00.622)       0:02:34.006 ********
fatal: [zosmf1]: FAILED! => {"cache_control": "no-cache=\"set-cookie, set-cookie2\"", "changed": false, "connection": "Close", "content": "{\"category\":6,\"rc\":8,\"reason\":93651005,\"message\":\"File not found.\",\"stack\":\"  1 20506E58+000001D4 PosixFileControl::open(const char*)\\n  2 205053C8+00000472 PutFileServlet::doPut()\\n  3 2050C788+000000CE TsoServlet::service()\\n  4 205399F8+0000019E TsoServlet::run()\\n  5 20539350+000003A0 main\\n  6 0626DF90+0000127C CEEVROND\\n  7 1FCFD280+000000B4 EDCZHINV\\n  8 06103978+000001C6 CEEBBEXT\\n\",\"details\":[\"EDC5129I No such file or directory. (errno2=0x0594003D)\"]}", "content_language": "en-US", "content_length": "464", "content_type": "application/json; charset=UTF-8", "date": "Wed, 01 Jul 2020 05:24:59 GMT", "elapsed": 0, "expires": "Thu, 01 Dec 1994 16:00:00 GMT", "json": {"category": 6, "details": ["EDC5129I No such file or directory. (errno2=0x0594003D)"], "message": "File not found.", "rc": 8, "reason": 93651005, "stack": "  1 20506E58+000001D4 PosixFileControl::open(const char*)\n  2 205053C8+00000472 PutFileServlet::doPut()\n  3 2050C788+000000CE TsoServlet::service()\n  4 205399F8+0000019E TsoServlet::run()\n  5 20539350+000003A0 main\n  6 0626DF90+0000127C CEEVROND\n  7 1FCFD280+000000B4 EDCZHINV\n  8 06103978+000001C6 CEEBBEXT\n"}, "msg": "Status code was 404 and not [204]: HTTP Error 404: Not Found", "redirected": false, "set_cookie": "LtpaToken2=zdYQj/N7e5uP16tmx2nwig0nKYhJTXAKEdYjDPuejgx4DW4NSMz9JhVkuNLlnZ4RMObpG6OLnPZvxbIhlfP/ZNzETiq9uifFy4CMVS5/zQwYC/lbN8/Cs4bqwHI6eiiPPTm11O0fsztwvoIE0Ewk6ab1w8rWX2LvScYQWgAApBsVfZYry/GlTZKP73/ErxNjQsN4vusgAIpjgFNVURAIBNCSrzTQQYW81i3VfM32vmuPytJt+fb7atj2IWxNZwA/fyjy94YwwPuTNjBzE855x5dG+N14ri3O7NYg+4vLUOtsg2qoCUhDd3+IDW+YCF2s; Path=/; Secure; HttpOnly", "status": 404, "strict_transport_security": "max-age=31536000; includeSubDomains", "url": "https://xxxx:yyy/zosmf/restfiles/fs/workdir/DFHWLP/wlp/usr/servers/defaultServer/dropins/CloudTestServlet.war", "x_content_type_options": "nosniff", "x_ibm_txid": "tx000000000001A172", "x_powered_by": "Servlet/3.1", "x_xss_protection": "1; mode=block"}

Allow Workflow automation to run in sequential or parallel excuition

Looks like the current logic is that if the workflow allows parallel execution, the ansible-playbook will default to parallel automation, and no way to override with the setting.

Looking for a parameter to specify what style of automation the playbook is to execute the workflow steps.

    - name: "zOSMF workflow"
      delegate_to: localhost
      ibm.ibm_zosmf.zmf_workflow:
        ...
        state: "started"
        action "start | startParallel" # <- example parameter
        workflow_owner: "xxxx"
        ...
        workflow_vars_file: "wf-var.properties "
      register: result

How to assign value to z/OSMF header (X-IBM-Intrdr-File-Encoding)?

Good day team,

With the purpose of handling data (including job-log) containing Japanese characters, one of our clients is trying to set a combination of z/OSMF custom and standard headers (as mentioned below) while making use of various roles in ibm_zos_zosmf Ansible collection.

            'Content-Type': 'text/plain;charset=UTF-8',
            'X-IBM-Intrdr-Class': 'H',
            'X-IBM-Intrdr-Recfm': 'F',
            'X-IBM-Intrdr-Lrecl': '80',
            'X-IBM-Intrdr-Mode': 'TEXT',
            'X-IBM-Intrdr-File-Encoding': 'IBM-939',

            'Content-Type': 'application/octet-stream;charset=UTF-8',
            'X-IBM-Intrdr-Class': 'H',
            'X-IBM-Intrdr-Recfm': 'F',
            'X-IBM-Intrdr-Lrecl': '80',
            'X-IBM-Intrdr-Mode': 'BINARY',
            'X-IBM-Intrdr-File-Encoding': 'IBM-939',

We understand that in case of role - zmf_job_complete, header values can be assigned using a combination of role variables: -

  1. job_jcl_location
  2. job_internal_reader_mode
  3. job_internal_reader_class
  4. job_internal_reader_recfm
  5. job_internal_reader_lrecl

However, there is no role variable defined to set X-IBM-Intrdr-File-Encoding.

Mentioned below are the queries we have with regards to current functionality of ibm_zos_zosmf collection: -

  1. Is there a way/ work-around to explicitly set the values of z/OSMF individual (custom, standard) headers inside Ansible ibm_zos_zosmf roles?
  2. Is there a way to set custom header X-IBM-Intrdr-File-Encoding to a specific encoding scheme inside zmf_job_complete and zmf_job_query roles? This is similar to setting value for encoding parameter for zos_job_submit module. In our case, the value is IBM-939.

PS: Our client is able to handle data containing Japanese characters by making z/OSMF RESTful API calls through a Python script and looking forward to emulate the same behavior using Ansible ibm_zos_zosmf collection. If you need to look into the functioning of Python script, please let me know and I'll share the specifics.

Many thanks.

Delete Job after completion

Hi all,

would it be possible to add a parameter to the role zmf_job_complete that triggers a delete of the job from the spool of the target system? Zowe CLI and hence the z/OSMF REST API support that (just a simple DELETE on the job ID I think).

This capability is missing in general from this collection, but would help me a lot.

Cheers,
Tobias

ansible jobstatement

how can i enter a job statement on 2 records in an ansible playbook with z/OSMF collection ? i have looked at https://www.ibm.com/support/knowledgecenter/SSLTBW_2.2.0/com.ibm.zos.v2r2.izua700/izuprog_API_WorkflowCreateNew.htm which says:
"For a workflow that submits a job, this property specifies the JOB statement JCL that is used in the job. This property can be null, or a list of JCL cards, each up to 72 characters long. Columns 1 and 2 of each record must be "//" or "/*" and the job name must be 1 to 8 characters."
The variations i have tried were not sucessful, like
workflow_job_statement: "//IZUWFJB JOB MSGCLASS=X,REGION=4M,NOTIFY=&SYSUID,
// MSGLEVEL=1"
The 2 records are appended on the same 1rst JOB CARD....
Could you post a sample how to achieve that, having a JOBCARD on 2 records with a continuation line.

z/OSMF Roles as opposed to Modules?

Hello,

As an avid Ansible user (and Mainframe Sysprog), I am very excited that IBM is working on Ansible content to interface with the mainframe. We're big z/OSMF users so this code seems like it could be a great fit. However, I was a little confused about your code structure.

Why are most of the z/OSMF functions (like zmf_job_complete) presented as YAML roles instead of Python modules? Having all the logic built into YAML makes it more confusing and harder to maintain than having a separate Python Module for it (as discussed here: https://www.ansible.com/blog/make-your-ansible-playbooks-flexible-maintainable-and-scalable). I looked at IBM's other Ansible Content (z/OS + IMS) and most of that code is in the module format. Other companies also tend to use Modules for API-driven functions (VMWare, JIRA, etc.)

Are there any plans down the line to convert roles like zmf_job_complete to a Python Module instead?

Thanks!
Dakota Heyman

"Connection failure: The read operation timed out" when run the sample_role_cpm_provision.yml

ansible version: 2.9.0
ibm_zos_zosmf version: 1.0.0

When I run the sample_role_cpm_provision.yml to create the software service, the instance can be provisioned, but I got following error in task log:

TASK [provision_software_service : Provision template] ************************************************************************************************************
fatal: [S0W1 -> localhost]: FAILED! => {"changed": false, "content": "", "elapsed": 31, "msg": "Status code was -1 and not [200]: Connection failure: The read operation timed out", "redirected": false, "status": -1, "url": "https://xx.xx.xx.xx:443/zosmf/provisioning/rest/1.0/psc/CICS55/actions/run"}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.