0
是否有一些文件模块,将允许读取文件,过滤其内容并将更改的文件存储在一个任务?像Ansible模块来过滤文件内容
- shell: cat /path/file.txt
register: file_content
- copy:
content: "{{ file_content.stdout | from_json | to_nice_json(indent=4) }}"
dest: "/path/file.txt"
但在单个任务?