如何使Ansible YAML解析接受此命令?
问题:如何使Ansible YAML解析接受此命令?,yaml,ansible,ansible-playbook,Yaml,Ansible,Ansible Playbook,问题: 如何使Ansible YAML解析接受此命令 以下详细信息: 本亚马尔: 验证人: 但ansible说: 作为参考,本YAML工作完美: 试一试 不要信任编辑器或语法高亮显示。让ansible告诉您是否存在问题(如果需要,可以使用-C标志运行它以模拟干运行)。还可以尝试将回购URL周围的单引号替换为双引号。已在lubuntu 14.04.2和ansible 1.8.4中验证 -shell: "/home/developer/eclipse/eclipse -application
如何使Ansible YAML解析接受此命令 以下详细信息: 本亚马尔: 验证人:
但ansible说: 作为参考,本YAML工作完美: 试一试
不要信任编辑器或语法高亮显示。让ansible告诉您是否存在问题(如果需要,可以使用-C标志运行它以模拟干运行)。还可以尝试将回购URL周围的单引号替换为双引号。已在lubuntu 14.04.2和ansible 1.8.4中验证
-shell: "/home/developer/eclipse/eclipse -application org.eclipse.equinox.p2.director -noSplash -repository
'http://moreunit.sourceforge.net/update-site' -installIUs
org.moreunit.feature.group"
This one looks easy to fix. It seems that there is a value started
with a quote, and the YAML parser is expecting to see the line ended
with the same kind of quote. For instance:
when: "ok" in result.stdout
Could be written as:
when: '"ok" in result.stdout'
or equivalently:
when: "'ok' in result.stdout"
-shell: "wget 'http://ftp.gnu.org/gnu/wget/wget-1.5.3.tar.gzip'"
- shell: >
/home/developer/eclipse/eclipse
-application org.eclipse.equinox.p2.director
-noSplash
-repository 'http://moreunit.sourceforge.net/update-site'
-installIUs org.moreunit.feature.group