即使结果正确,win_lineinfile也显示模块故障

时间:2019-07-16 11:55:49

标签: ansible

使用win_lineinfile将行添加到文件中,但是输出显示模块故障。

Playbook

- name: Testing
  win_lineinfile:
    path: "{{csv_win_file}}"
    line: "{{ item }}"
    create: yes
    state: present   
  with_items: "{{inv}}"
  ignore_errors: yes
  become: yes

调试inv的输出

"inv": [
            "Web,1",
            "Processing,2",
            "Service,3"
]

win_lineinfile的输出(三分之一)

{"changed": false, "item": "Processing,2", "module_stderr": "\\r\\n", "module_stdout": "2 {\\"changed\\":true,\\"backup\\":\\"\\",\\"msg\\":\\"line added\\",\\"encoding\\":\\"utf-8\\"}\\r\\n", "msg": "MODULE FAILURE", "rc": 0}

有人可以帮我检查一下为什么显示为模块故障,这是怎么回事?

0 个答案:

没有答案