我需要Ansible将一些文本写入具有以下内容的Windows文件:
{
"list": {
"q": "butter",
"sr": "1",
"ds": "Standard Reference",
"start": 0,
"end": 25,
"total": 104,
"group": "",
"sort": "n",
"item": [
{
"offset": 0,
"group": "Baked Products",
"name": "Archway Home Style Cookies, Peanut Butter",
"ndbno": "18541",
"ds": "SR",
"manu": "Archway Cookies"
},
{
"offset": 1,
"group": "Dairy and Egg Products",
"name": "Butter, Clarified butter (ghee)",
"ndbno": "01323",
"ds": "SR",
"manu": "none"
},
...
但是我很难替换反斜杠。到目前为止,我得到了
my.config=C\:\\myfolder\\myconfigfile.txt
使用以下代码:
my.config=C:\myfolder\myconfigfile.txt
任何人都有建议,这与单/双引号,单/双反斜杠非常混淆。谢谢。