Skip to content

Change just a part of a line - zos_lineinfile #902

Closed Answered by ddimatos
fabiobncbb asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @fabiobncbb , we don't have a module yet that can perform word replacement, while such a module is in our internal backlog (zos_replace) , the module design is not yet complete there for not in our public backlog, but the good news is that since Ansible is so flexible there are other ways to achieve this.

My recommendation is to use ZOAU dsed directly. Only note that there is a but we are looking into so you can't perform something like:

dsed 's/V[0-9]{3}/V000/g'

But you can do this instead:

command: "dsed 's/V590/V610/g' 'ANSIBLE.LINEFILE.SEQ'"

Playbook recreate (i know you mentioned PDSE, but leave that exercise up to you, I used a sequential, should be same):


    - name: Create s…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ddimatos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
Resolved The issue is resolved, authors issue has been addressed
2 participants