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"
但在單個任務?