diff --git a/ibm_concert/cert_renewal/roles/print_hc_buffer/templates/HZSPRINT.J2 b/ibm_concert/cert_renewal/HZSPRINT.J2 similarity index 78% rename from ibm_concert/cert_renewal/roles/print_hc_buffer/templates/HZSPRINT.J2 rename to ibm_concert/cert_renewal/HZSPRINT.J2 index 871cd3950..121fcdc20 100644 --- a/ibm_concert/cert_renewal/roles/print_hc_buffer/templates/HZSPRINT.J2 +++ b/ibm_concert/cert_renewal/HZSPRINT.J2 @@ -1,7 +1,7 @@ {{ JOB_CARD }} //HZSPRINT EXEC PGM=HZSPRNT,TIME=1440,REGION=0M,PARMDD=SYSIN //SYSIN DD *,DLM='@@' -CHECK({{ hc_check }}) +CHECK(IBMRACF,RACF_CERTIFICATE_EXPIRATION) ,EXCEPTIONS @@ //SYSOUT DD SYSOUT=A,DCB=(LRECL=256) diff --git a/ibm_concert/cert_renewal/inventories/host_vars/zos_host.yml b/ibm_concert/cert_renewal/inventories/host_vars/zos_host.yml index d3fbba3d4..f354dc320 100644 --- a/ibm_concert/cert_renewal/inventories/host_vars/zos_host.yml +++ b/ibm_concert/cert_renewal/inventories/host_vars/zos_host.yml @@ -23,3 +23,8 @@ ZOAU: "path_to_zoau" # variable`ansible_python_interpreter` ################################################################################ ansible_python_interpreter: "{{ PYZ }}/bin/python3" + +# varibles for templates +JOB_CARD: |- + //HZSPRINT JOB , + // MSGCLASS=H,MSGLEVEL=(1,1),CLASS=A diff --git a/ibm_concert/cert_renewal/renew_cert.yml b/ibm_concert/cert_renewal/renew_cert.yml index 865ea6a7e..0767fc4f6 100644 --- a/ibm_concert/cert_renewal/renew_cert.yml +++ b/ibm_concert/cert_renewal/renew_cert.yml @@ -71,16 +71,17 @@ register: playbook_tmp_dir - block: - - ansible.builtin.include_role: - name: issue_operator_cmd - vars: - task_description: 'Run Health Checker' - command: "F HZSPROC,RUN,CHECK=(IBMRACF,RACF_CERTIFICATE_EXPIRATION)" - - - ansible.builtin.include_role: - name: print_hc_buffer - vars: - hc_check: 'IBMRACF,RACF_CERTIFICATE_EXPIRATION' + - name: Run Health Checker + ibm.ibm_zos_core.zos_operator: + cmd: "F HZSPROC,RUN,CHECK=(IBMRACF,RACF_CERTIFICATE_EXPIRATION)" + register: zos_operator_output + + - name: Get expiring certs report for IBMRACF,RACF_CERTIFICATE_EXPIRATION + ibm.ibm_zos_core.zos_job_submit: + src: '{{ playbook_dir }}/HZSPRINT.J2' + location: local + use_template: true + register: hc_job_output - name: Search for {{cert_label}} in report ansible.builtin.set_fact: @@ -159,45 +160,39 @@ - ansible.builtin.debug: var: cert_args - - ansible.builtin.include_role: - name: issue_tso_cmd - vars: - task_description: 'Back up current certificate' - command: + - name: Back up current certificate + ibm.ibm_zos_core.zos_tso_command: + commands: - RACDCERT EXPORT(LABEL('{{cert_label}}')) DSN('{{ ansible_user }}.CERT.{{cert_type}}.BACKUP.{{today}}') {{cert_type}} - RACDCERT CHECKCERT('{{ ansible_user }}.CERT.{{cert_type}}.BACKUP.{{today}}') when: not cert_type == 'USER' - - - ansible.builtin.include_role: - - name: issue_tso_cmd - vars: - task_description: 'Back up current certificate' - command: + register: tso_cmd_output + + - name: Back up current certificate + ibm.ibm_zos_core.zos_tso_command: + commands: - RACDCERT EXPORT(LABEL('{{cert_label}}')) ID({{owner_id}}) DSN('{{ ansible_user }}.CERT.{{cert_type}}.BACKUP.{{today}}') - RACDCERT CHECKCERT('{{ ansible_user }}.CERT.{{cert_type}}.BACKUP.{{today}}') ID({{owner_id}}) when: cert_type == 'USER' + register: tso_cmd_output - ansible.builtin.set_fact: random_str: "{{lookup('community.general.random_string', length=3, special=false)}}" - - ansible.builtin.include_role: - name: issue_tso_cmd - vars: - task_description: 'Rekey and Generate new cert request for {{cert_type}}' - command: + - name: Rekey and Generate new cert request for {{cert_type}} + ibm.ibm_zos_core.zos_tso_command: + commands: - RACDCERT {{cert_type}} REKEY(LABEL('{{cert_label}}')) WITHLABEL('{{cert_label[:-3]}}{{random_str}}') NOTAFTER(DATE({{expiry_date}})) - RACDCERT {{cert_type}} ROLLOVER(LABEL('{{cert_label}}')) NEWLABEL('{{cert_label[:-3]}}{{random_str}}') - RACDCERT {{cert_type}} LIST(LABEL('{{cert_label[:-3]}}{{random_str}}')) - RACDCERT {{cert_type}} DELETE(LABEL('{{ cert_label }}')) - RACDCERT {{cert_type}} ALTER(LABEL('{{ cert_label[:-3]}}{{random_str}}')) NEWLABEL('{{ cert_label }}') when: cert_type == 'CERTAUTH' + register: tso_cmd_output - - ansible.builtin.include_role: - name: issue_tso_cmd - vars: - task_description: 'Rekey and Generate new cert request for {{cert_type}}' - command: + - name: Rekey and Generate new cert request for {{cert_type}} + ibm.ibm_zos_core.zos_tso_command: + commands: - RACDCERT {{cert_type}} REKEY(LABEL('{{cert_label}}')) WITHLABEL('{{cert_label[:-3]}}{{random_str}}') NOTAFTER(DATE({{expiry_date}})) - RACDCERT {{cert_type}} GENREQ (LABEL('{{cert_label[:-3]}}{{random_str}}')) DSN('{{ ansible_user }}.CSR.{{cert_type}}.{{today}}') - RACDCERT {{cert_type}} GENCERT('{{ ansible_user }}.CSR.{{cert_type}}.{{today}}') SIGNWITH({{sign_with}} LABEL('{{cert_args.cert_signer}}')) NOTAFTER(DATE({{expiry_date}})) @@ -206,12 +201,11 @@ - RACDCERT {{cert_type}} DELETE(LABEL('{{ cert_label }}')) - RACDCERT {{cert_type}} ALTER(LABEL('{{ cert_label[:-3]}}{{random_str}}')) NEWLABEL('{{ cert_label }}') when: cert_type == 'SITE' + register: tso_cmd_output - - ansible.builtin.include_role: - name: issue_tso_cmd - vars: - task_description: 'Rekey and Generate new cert request for {{cert_type}}' - command: + - name: Rekey and Generate new cert request for {{cert_type}} + ibm.ibm_zos_core.zos_tso_command: + commands: - RACDCERT ID({{owner_id}}) REKEY(LABEL('{{cert_label}}')) WITHLABEL('{{cert_label[:-3]}}{{random_str}}') NOTAFTER(DATE({{expiry_date}})) - RACDCERT ID({{owner_id}}) GENREQ (LABEL('{{cert_label[:-3]}}{{random_str}}')) DSN('{{ ansible_user }}.CSR.{{cert_type}}.{{today}}') - RACDCERT ID({{owner_id}}) GENCERT('{{ ansible_user }}.CSR.{{cert_type}}.{{today}}') SIGNWITH({{sign_with}} LABEL('{{cert_args.cert_signer}}')) NOTAFTER(DATE({{expiry_date}})) @@ -220,6 +214,7 @@ - RACDCERT ID({{owner_id}}) DELETE(LABEL('{{cert_label}}')) - RACDCERT ID({{owner_id}}) ALTER(LABEL('{{ cert_label[:-3]}}{{random_str}}')) NEWLABEL('{{ cert_label }}') when: cert_type == 'USER' + register: tso_cmd_output - name: Save new expiration date ansible.builtin.set_fact: diff --git a/ibm_concert/cert_renewal/roles/issue_operator_cmd/README.md b/ibm_concert/cert_renewal/roles/issue_operator_cmd/README.md deleted file mode 100644 index b5ac60f9e..000000000 --- a/ibm_concert/cert_renewal/roles/issue_operator_cmd/README.md +++ /dev/null @@ -1,53 +0,0 @@ -add_certificate -========= - -Add a digital certificate to a key ring and activate it - -Requirements ------------- - -- Ansible Collection `ibm.ibm_zos_core` - -Role Variables --------------- - -- ### **command** - - Specifies operator command to be issued -- ### **task_description** - - Specifies a description related to the command to be issued - - -Example Playbook ----------------- - -```yaml -- hosts: all - collections: - - ibm.ibm_zos_core - gather_facts: no - environment: "{{ environment_vars }}" - vars: - - - include_role: - name: isssue_operator_cmd - vars: - command: 'd a,l' - task_description: 'Display active users' -``` - -License -------- - -Copyright (c) IBM Corporation 2024 Apache License, Version 2.0 (see https://opensource.org/licenses/Apache-2.0) - -Author Information ------------------- - -- Andy Nguyen andy.nguyen@ibm.com - -Copyright ---------- - -© Copyright IBM Corporation 2024 diff --git a/ibm_concert/cert_renewal/roles/issue_operator_cmd/defaults/main.yml b/ibm_concert/cert_renewal/roles/issue_operator_cmd/defaults/main.yml deleted file mode 100644 index ce02007f5..000000000 --- a/ibm_concert/cert_renewal/roles/issue_operator_cmd/defaults/main.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -# Copyright (c) IBM Corporation 2021 - -# defaults file for issue_operator_cmd diff --git a/ibm_concert/cert_renewal/roles/issue_operator_cmd/handlers/main.yml b/ibm_concert/cert_renewal/roles/issue_operator_cmd/handlers/main.yml deleted file mode 100644 index 45d2f6909..000000000 --- a/ibm_concert/cert_renewal/roles/issue_operator_cmd/handlers/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# handlers file for issue_operator_cmd diff --git a/ibm_concert/cert_renewal/roles/issue_operator_cmd/meta/main.yml b/ibm_concert/cert_renewal/roles/issue_operator_cmd/meta/main.yml deleted file mode 100644 index f18426fc1..000000000 --- a/ibm_concert/cert_renewal/roles/issue_operator_cmd/meta/main.yml +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) IBM Corporation 2021 - -galaxy_info: - author: Andy Nguyen - description: Ansible z/OS Core Developer - company: IBM - license: "Apache License, Version 2.0" - min_ansible_version: "2.9" - galaxy_tags: - - z - - zos - - z_os - - ibm_zos_core diff --git a/ibm_concert/cert_renewal/roles/issue_operator_cmd/tasks/main.yml b/ibm_concert/cert_renewal/roles/issue_operator_cmd/tasks/main.yml deleted file mode 100644 index 4b101d4ed..000000000 --- a/ibm_concert/cert_renewal/roles/issue_operator_cmd/tasks/main.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- -############################################################################### -# © Copyright IBM Corporation 2024 -############################################################################### - -# tasks file for issue_operator_cmd - -########################################################################## -# Issue zos command -########################################################################## -- name: "{{ task_description }}" - ibm.ibm_zos_core.zos_operator: - cmd: "{{command}}" - register: zos_operator_output diff --git a/ibm_concert/cert_renewal/roles/issue_operator_cmd/vars/main.yml b/ibm_concert/cert_renewal/roles/issue_operator_cmd/vars/main.yml deleted file mode 100644 index f8f40d5da..000000000 --- a/ibm_concert/cert_renewal/roles/issue_operator_cmd/vars/main.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -# vars file for issue_operator_cmd -command: '' -task_description: 'issue operator command' diff --git a/ibm_concert/cert_renewal/roles/issue_tso_cmd/README.md b/ibm_concert/cert_renewal/roles/issue_tso_cmd/README.md deleted file mode 100644 index b5ac60f9e..000000000 --- a/ibm_concert/cert_renewal/roles/issue_tso_cmd/README.md +++ /dev/null @@ -1,53 +0,0 @@ -add_certificate -========= - -Add a digital certificate to a key ring and activate it - -Requirements ------------- - -- Ansible Collection `ibm.ibm_zos_core` - -Role Variables --------------- - -- ### **command** - - Specifies operator command to be issued -- ### **task_description** - - Specifies a description related to the command to be issued - - -Example Playbook ----------------- - -```yaml -- hosts: all - collections: - - ibm.ibm_zos_core - gather_facts: no - environment: "{{ environment_vars }}" - vars: - - - include_role: - name: isssue_operator_cmd - vars: - command: 'd a,l' - task_description: 'Display active users' -``` - -License -------- - -Copyright (c) IBM Corporation 2024 Apache License, Version 2.0 (see https://opensource.org/licenses/Apache-2.0) - -Author Information ------------------- - -- Andy Nguyen andy.nguyen@ibm.com - -Copyright ---------- - -© Copyright IBM Corporation 2024 diff --git a/ibm_concert/cert_renewal/roles/issue_tso_cmd/defaults/main.yml b/ibm_concert/cert_renewal/roles/issue_tso_cmd/defaults/main.yml deleted file mode 100644 index ce02007f5..000000000 --- a/ibm_concert/cert_renewal/roles/issue_tso_cmd/defaults/main.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -# Copyright (c) IBM Corporation 2021 - -# defaults file for issue_operator_cmd diff --git a/ibm_concert/cert_renewal/roles/issue_tso_cmd/handlers/main.yml b/ibm_concert/cert_renewal/roles/issue_tso_cmd/handlers/main.yml deleted file mode 100644 index 45d2f6909..000000000 --- a/ibm_concert/cert_renewal/roles/issue_tso_cmd/handlers/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# handlers file for issue_operator_cmd diff --git a/ibm_concert/cert_renewal/roles/issue_tso_cmd/meta/main.yml b/ibm_concert/cert_renewal/roles/issue_tso_cmd/meta/main.yml deleted file mode 100644 index f18426fc1..000000000 --- a/ibm_concert/cert_renewal/roles/issue_tso_cmd/meta/main.yml +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) IBM Corporation 2021 - -galaxy_info: - author: Andy Nguyen - description: Ansible z/OS Core Developer - company: IBM - license: "Apache License, Version 2.0" - min_ansible_version: "2.9" - galaxy_tags: - - z - - zos - - z_os - - ibm_zos_core diff --git a/ibm_concert/cert_renewal/roles/issue_tso_cmd/tasks/main.yml b/ibm_concert/cert_renewal/roles/issue_tso_cmd/tasks/main.yml deleted file mode 100644 index 133132697..000000000 --- a/ibm_concert/cert_renewal/roles/issue_tso_cmd/tasks/main.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- -############################################################################### -# © Copyright IBM Corporation 2024 -############################################################################### - -# tasks file for issue_operator_cmd - -########################################################################## -# Issue zos command -########################################################################## -- name: "{{ task_description }}" - ibm.ibm_zos_core.zos_tso_command: - commands: "{{command}}" - register: tso_cmd_output diff --git a/ibm_concert/cert_renewal/roles/issue_tso_cmd/vars/main.yml b/ibm_concert/cert_renewal/roles/issue_tso_cmd/vars/main.yml deleted file mode 100644 index f8f40d5da..000000000 --- a/ibm_concert/cert_renewal/roles/issue_tso_cmd/vars/main.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -# vars file for issue_operator_cmd -command: '' -task_description: 'issue operator command' diff --git a/ibm_concert/cert_renewal/roles/print_hc_buffer/README.md b/ibm_concert/cert_renewal/roles/print_hc_buffer/README.md deleted file mode 100644 index 27442d694..000000000 --- a/ibm_concert/cert_renewal/roles/print_hc_buffer/README.md +++ /dev/null @@ -1,48 +0,0 @@ -print_hc_buffer -========= - -Extract Health Checker data - -Requirements ------------- - -- Ansible Collection `ibm.ibm_zos_core` - -Role Variables --------------- - -- ### **hc_check** - - Specifies the Health Checker check to print the data for - -Example Playbook ----------------- - -```yaml -- hosts: all - collections: - - ibm.ibm_zos_core - gather_facts: no - environment: "{{ environment_vars }}" - vars: - - - include_role: - name: print_hc_buffer - vars: - hc_check: 'IBMRACF,RACF_CERTIFICATE_EXPIRATION' -``` - -License -------- - -Copyright (c) IBM Corporation 2024 Apache License, Version 2.0 (see https://opensource.org/licenses/Apache-2.0) - -Author Information ------------------- - -- Andy Nguyen andy.nguyen@ibm.com - -Copyright ---------- - -© Copyright IBM Corporation 2024 diff --git a/ibm_concert/cert_renewal/roles/print_hc_buffer/defaults/main.yml b/ibm_concert/cert_renewal/roles/print_hc_buffer/defaults/main.yml deleted file mode 100644 index 138f92b53..000000000 --- a/ibm_concert/cert_renewal/roles/print_hc_buffer/defaults/main.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -# Copyright (c) IBM Corporation 2021 - -# defaults file for print_hc_buffer -JOB_CARD: |- - //HZSPRINT JOB 'IMS SYSTEM', - // MSGCLASS=H,MSGLEVEL=(1,1),CLASS=A, - // NOTIFY=&SYSUID diff --git a/ibm_concert/cert_renewal/roles/print_hc_buffer/handlers/main.yml b/ibm_concert/cert_renewal/roles/print_hc_buffer/handlers/main.yml deleted file mode 100644 index a6026e23d..000000000 --- a/ibm_concert/cert_renewal/roles/print_hc_buffer/handlers/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# handlers file for print_hc_buffer diff --git a/ibm_concert/cert_renewal/roles/print_hc_buffer/meta/main.yml b/ibm_concert/cert_renewal/roles/print_hc_buffer/meta/main.yml deleted file mode 100644 index f18426fc1..000000000 --- a/ibm_concert/cert_renewal/roles/print_hc_buffer/meta/main.yml +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) IBM Corporation 2021 - -galaxy_info: - author: Andy Nguyen - description: Ansible z/OS Core Developer - company: IBM - license: "Apache License, Version 2.0" - min_ansible_version: "2.9" - galaxy_tags: - - z - - zos - - z_os - - ibm_zos_core diff --git a/ibm_concert/cert_renewal/roles/print_hc_buffer/tasks/main.yml b/ibm_concert/cert_renewal/roles/print_hc_buffer/tasks/main.yml deleted file mode 100644 index 97f168e46..000000000 --- a/ibm_concert/cert_renewal/roles/print_hc_buffer/tasks/main.yml +++ /dev/null @@ -1,24 +0,0 @@ ---- -############################################################################### -# © Copyright IBM Corporation 2024 -############################################################################### - -# tasks file for print_hc_buffer -########################################################################### -# skeleton for HZSPRNT -########################################################################### -- name: Send JCL template - block: - - ansible.builtin.set_fact: - eager_role_path: '{{ role_path }}' - - - ansible.builtin.include_role: - name: send-template - vars: - path: '{{ eager_role_path }}/templates/HZSPRINT.J2' - - - name: Get expiring certs report for {{ hc_check }} - ibm.ibm_zos_core.zos_job_submit: - src: '{{ uss_file_path }}/HZSPRINT.J2' - location: USS - register: hc_job_output diff --git a/ibm_concert/cert_renewal/roles/print_hc_buffer/vars/main.yml b/ibm_concert/cert_renewal/roles/print_hc_buffer/vars/main.yml deleted file mode 100644 index e4ead5f31..000000000 --- a/ibm_concert/cert_renewal/roles/print_hc_buffer/vars/main.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -# vars file for print_hc_buffer -hc_check: '' diff --git a/ibm_concert/cert_renewal/roles/send-template/README.md b/ibm_concert/cert_renewal/roles/send-template/README.md deleted file mode 100644 index 225dd44b9..000000000 --- a/ibm_concert/cert_renewal/roles/send-template/README.md +++ /dev/null @@ -1,38 +0,0 @@ -Role Name -========= - -A brief description of the role goes here. - -Requirements ------------- - -Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. - -Role Variables --------------- - -A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. - -Dependencies ------------- - -A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. - -Example Playbook ----------------- - -Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: - - - hosts: servers - roles: - - { role: username.rolename, x: 42 } - -License -------- - -BSD - -Author Information ------------------- - -An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/ibm_concert/cert_renewal/roles/send-template/defaults/main.yml b/ibm_concert/cert_renewal/roles/send-template/defaults/main.yml deleted file mode 100644 index fa39aa054..000000000 --- a/ibm_concert/cert_renewal/roles/send-template/defaults/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# defaults file for send-template diff --git a/ibm_concert/cert_renewal/roles/send-template/handlers/main.yml b/ibm_concert/cert_renewal/roles/send-template/handlers/main.yml deleted file mode 100644 index cdbf5309c..000000000 --- a/ibm_concert/cert_renewal/roles/send-template/handlers/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# handlers file for send-template diff --git a/ibm_concert/cert_renewal/roles/send-template/meta/main.yml b/ibm_concert/cert_renewal/roles/send-template/meta/main.yml deleted file mode 100644 index f043c64f5..000000000 --- a/ibm_concert/cert_renewal/roles/send-template/meta/main.yml +++ /dev/null @@ -1,60 +0,0 @@ -galaxy_info: - author: your name - description: your description - company: your company (optional) - - # If the issue tracker for your role is not on github, uncomment the - # next line and provide a value - # issue_tracker_url: http://example.com/issue/tracker - - # Some suggested licenses: - # - BSD (default) - # - MIT - # - GPLv2 - # - GPLv3 - # - Apache - # - CC-BY - license: license (GPLv2, CC-BY, etc) - - min_ansible_version: "2.4" - - # If this a Container Enabled role, provide the minimum Ansible Container version. - # min_ansible_container_version: - - # Optionally specify the branch Galaxy will use when accessing the GitHub - # repo for this role. During role install, if no tags are available, - # Galaxy will use this branch. During import Galaxy will access files on - # this branch. If Travis integration is configured, only notifications for this - # branch will be accepted. Otherwise, in all cases, the repo's default branch - # (usually master) will be used. - # github_branch: - - # - # Provide a list of supported platforms, and for each platform a list of versions. - # If you don't wish to enumerate all versions for a particular platform, use 'all'. - # To view available platforms and versions (or releases), visit: - # https://galaxy.ansible.com/api/v1/platforms/ - # - # platforms: - # - name: Fedora - # versions: - # - all - # - 25 - # - name: SomePlatform - # versions: - # - all - # - 1.0 - # - 7 - # - 99.99 - - galaxy_tags: [] - # List tags for your role here, one per line. A tag is a keyword that describes - # and categorizes the role. Users find roles by searching for tags. Be sure to - # remove the '[]' above, if you add tags to this list. - # - # NOTE: A tag is limited to a single word comprised of alphanumeric characters. - # Maximum 20 tags per role. - -dependencies: [] - # List your role dependencies here, one per line. Be sure to remove the '[]' above, - # if you add dependencies to this list. diff --git a/ibm_concert/cert_renewal/roles/send-template/tasks/main.yml b/ibm_concert/cert_renewal/roles/send-template/tasks/main.yml deleted file mode 100644 index e5edfdbaf..000000000 --- a/ibm_concert/cert_renewal/roles/send-template/tasks/main.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -############################################################################### -# © Copyright IBM Corporation 2024 -############################################################################### - -# tasks file for send-template -- name: Send template - ansible.builtin.template: - src: '{{ path }}' - dest: '{{ uss_file_path }}/{{ path | basename }}' - -- name: Encode all template files - ansible.builtin.shell: iconv -f ISO8859-1 -t IBM-1047 {{ path | basename }} > {{ path | basename }}1; chtag -tc IBM-1047 {{ path | basename }}1; mv {{ path | basename }}1 {{ path | basename }} - args: - chdir: '{{ uss_file_path }}' diff --git a/ibm_concert/cert_renewal/roles/send-template/vars/main.yml b/ibm_concert/cert_renewal/roles/send-template/vars/main.yml deleted file mode 100644 index 692baf9ef..000000000 --- a/ibm_concert/cert_renewal/roles/send-template/vars/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# vars file for send-template diff --git a/ibm_concert/cert_renewal/send_cert_data.yml b/ibm_concert/cert_renewal/send_cert_data.yml index 6e5aa4feb..383bd28a6 100644 --- a/ibm_concert/cert_renewal/send_cert_data.yml +++ b/ibm_concert/cert_renewal/send_cert_data.yml @@ -6,6 +6,7 @@ gather_facts: false environment: "{{ environment_vars }}" vars: + # IBM Concert variables concert_hostname: '' concert_instance_id: '' @@ -35,16 +36,18 @@ register: playbook_tmp_dir - block: - - ansible.builtin.include_role: - name: issue_operator_cmd - vars: - task_description: 'Run Health Checker' - command: "F HZSPROC,RUN,CHECK=(IBMRACF,RACF_CERTIFICATE_EXPIRATION)" - - - ansible.builtin.include_role: - name: print_hc_buffer - vars: - hc_check: 'IBMRACF,RACF_CERTIFICATE_EXPIRATION' + - name: Run Health Checker + ibm.ibm_zos_core.zos_operator: + cmd: "F HZSPROC,RUN,CHECK=(IBMRACF,RACF_CERTIFICATE_EXPIRATION)" + register: zos_operator_output + + - name: Get expiring certs report from IBMRACF,RACF_CERTIFICATE_EXPIRATION + ibm.ibm_zos_core.zos_job_submit: + src: '{{ playbook_dir }}/HZSPRINT.J2' + location: local + use_template: true + + register: hc_job_output - name: Get report lines ansible.builtin.set_fact: