Skip to content

I want to remove a block between # BEGIN and # END from a PDS member with the help of blockinfile module. #1668

@rohan-zos-ansible

Description

@rohan-zos-ansible

I want to remove a block between # BEGIN and # END from a PDS member with the help of blockinfile module.

SCRIPT +                                              
# BEGIN ANSIBLE MANAGED BLOCK                         
       UTIDSN(ZZZDBU.V51QA.SMPE.DBUSCRL +             
       ZZZBRI.QAV51.BRISCRL  +                        
       ZZZCDBU.V51QA.SMPE.DBUSCRS  +                   
       ZZZCBRI.QAV51.BRISCRS) +                        
       SYSOUT(*) TRACE(Y) TRACEOUT(*)                 
# END ANSIBLE MANAGED BLOCK            

Code:

        - name: Remove some libraries from Scripts in INI file
          ibm.ibm_zos_core.zos_blockinfile:
            src: "PDS.ANSIBLE.WORK.CNTL(TRZSINI)"
            marker_begin: "# BEGIN ANSIBLE MANAGED BLOCK                                           "
            marker_end: "# END ANSIBLE MANAGED BLOCK                                             "
            state: absent 

Not sure what mistake i am doing. If anyone has any knowledge on this, please let me know.

Thank you,
Rohan

Originally posted by @rohan-zos-ansible in #1667

Metadata

Metadata

Assignees

Labels

ClosedThe issue has had no activity for the past 30 days or it was found to no longer be needed.

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions