Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Salt stack global.sls中的转义字符(SALT)_Salt Stack_Salt - Fatal编程技术网

Salt stack global.sls中的转义字符(SALT)

Salt stack global.sls中的转义字符(SALT),salt-stack,salt,Salt Stack,Salt,我想在我的global.sls中应用一个特殊字符“的值,如下所示: testvalues: myvalue: 'testvalue' testvalues: myvalue: "'testvalue'" 当得到这个值时,我得到 testvalue 不料 'testvalue' 我怎样才能转义角色' 尝试使用“testvalue”也会导致 testvalue 有什么帮助吗?您可以在一个单引号字符串中转义两次单引号: testvalues: myvalue: '''testva

我想在我的global.sls中应用一个特殊字符“的值,如下所示:

testvalues:
  myvalue: 'testvalue'
testvalues:
  myvalue: "'testvalue'"
当得到这个值时,我得到

testvalue
不料

'testvalue'
我怎样才能转义角色'

尝试使用“testvalue”也会导致

testvalue

有什么帮助吗?

您可以在一个单引号字符串中转义两次单引号:

testvalues:
  myvalue: '''testvalue'''
也可以将它们括在双引号字符串中: