ansible 管理window机,修改编码格式

sed -i"s#tdout_buffer.append(stdout)#tdout_buffer.append(stdout.decode('gbk').encode('utf-8'))#g"/usr/lib/python2.6/site-packages/winrm/protocol.pysed -i"s#stderr_buffer.append(stderr)#stderr_buffer.append(stderr.decode('gbk').encode('utf-8'))#g"/usr/lib/python2.6/site-packages/winrm/protocol.py


或者

sed -i"s#tdout_buffer.append(stdout)#tdout_buffer.append(stdout.decode('gbk').encode('utf-8'))#g"/usr/lib/python2.7/site-packages/winrm/protocol.pysed -i"s#stderr_buffer.append(stderr)#stderr_buffer.append(stderr.decode('gbk').encode('utf-8'))#g"/usr/lib/python2.7/site-packages/winrm/protocol.py

你可能感兴趣的:(ansible 管理window机,修改编码格式)