当我lineinfile在ansible中使用它不是写字',"字符
lineinfile: 'dest=/home/xyz state=present line="CACHES="default""'
它是给予,CACHES=default
但所需的输出是CACHES="default"
怎么做到这一点?
下列...
require 'yaml'
test = "I'm a b&d string"
File.open('test.yaml', 'w') do |out|
out.write(test.to_yaml)
end
Run Code Online (Sandbox Code Playgroud)
......输出......
--- this is a b&d string
Run Code Online (Sandbox Code Playgroud)
我怎样才能输出它
--- 'this is a b&d string'
Run Code Online (Sandbox Code Playgroud)
???