【问题标题】:Invalid YAML ebextensionsYAML ebextensions 无效
【发布时间】:2018-09-05 11:41:30
【问题描述】:

我正在尝试将应用版本部署到弹性 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"

【问题讨论】:

  • 有关错误消息的更多上下文会有所帮助。

标签: apache yaml amazon-elastic-beanstalk ebextensions


【解决方案1】:

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

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

【讨论】:

    猜你喜欢
    • 2018-02-10
    • 2017-11-25
    • 2020-10-07
    • 2017-05-14
    • 2019-01-04
    • 2019-10-28
    • 1970-01-01
    • 1970-01-01
    • 2019-07-09
    相关资源
    最近更新 更多