无效的YAML ebextensions

时间:2018-03-27 07:15:33

标签: apache yaml elastic-beanstalk ebextensions

我尝试将应用版本部署到弹性beanstalk但我的配置文件格式不正确。

有很多转义报价,所以我不认为这是正确的,但我不知道如何解决它。

这是导致问题的一行;

    command: "sudo bash -c 'echo \"<img src=\'http://www.foo.com/img/custom_500.png\' alt=\'500\' style=\'left:50%;top:50%;position:fixed;margin-top:-235px;margin-left:-200px\'/>\"' > custom_50x.html"

1 个答案:

答案 0 :(得分:0)

尝试不使用开头和结尾的引号,例如:

command: sudo bash -c 'echo \"<img src=\'http://www.foo.com/img/custom_500.png\' alt=\'500\' style=\'left:50%;top:50%;position:fixed;margin-top:-235px;margin-left:-200px\'/>\"' > custom_50x.html

一种快速确定是否有问题的有用工具是在线使用此YAML Parser