模块故障。但是剧本却成功了
下面是代码
- name: audit the mm request
win_lineinfile:
path: \\server1\d$\temp\blackout\log\blackout.log
create: yes
insertafter: EOF
line: "{{ lookup('pipe','date') }} || MM request Audit || {{changerequest}} || {{requestor}} || {{serverlist}} || {{start_time}} || {{end_time}}"
newline: windows
ignore_errors: true
become: yes
become_method: runas
become_user: "{{ansible_user}}"
这是错误输出
{
"_ansible_parsed": false,
"_ansible_no_log": false,
"module_stderr": "\r\n",
"changed": false,
"module_stdout": "1 {\"changed\":true,\"backup\":\"\",\"msg\":\"line added\",\"diff\":{\"before\":\"\",\"after\":\"\\r\\nThu May 9 11:40:58 CDT 2019 || MM request Audit || 123 || ven4335 || server5,server6,server7,server8 || 2019-05-09 13:00:00 || 2019-05-10 15:00:00\"},\"encoding\":\"utf-8\"}\r\n",
"rc": 0,
"msg": "MODULE FAILURE"
}