【问题标题】:How do you specify VPC with Ansible ec2_lc module?如何使用 Ansible ec2_lc 模块指定 VPC?
【发布时间】:2017-07-27 02:48:33
【问题描述】:

我正在尝试使用 Ansible 创建启动配置。我正在使用http://docs.ansible.com/ec2_lc_module.html 中详细介绍的 ec2_lc 模块。

我正在创建启动配置并指定一些不属于我的默认 VPC 的安全组。但是,它不会让我这样做。它似乎默认为默认 VPC,我在文档中没有看到更改此设置的设置。有什么我忽略的吗?我的剧本的输出如下:

TASK: [aws-lc | building new aws launch configuration] ************************ 
failed: [localhost] => {"failed": true}
msg: BotoServerError: 400 Bad Request
<ErrorResponse xmlns="http://autoscaling.amazonaws.com/doc/2011-01-01/">
  <Error>
    <Type>Sender</Type>
    <Code>ValidationError</Code>
    <Message>The security group 'xyz-general-sg' does not exist in default VPC 'vpc-3Cef6a45'</Message>
  </Error>
  <RequestId>54121d19-1f30-11e5-1121-51263ee1684e</RequestId>
</ErrorResponse>

【问题讨论】:

    标签: amazon-web-services ansible ansible-playbook


    【解决方案1】:

    使用 VPC 时,您必须指定安全组 ID,而不是仅在 EC2 Classic 中接受的安全组名称。 [1]

    如果您没有使用名称,请检查您是否没有拼错安全组 ID。

    [1]http://docs.aws.amazon.com/cli/latest/reference/autoscaling/create-launch-configuration.html

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-06-27
      • 2020-08-26
      • 1970-01-01
      • 2020-02-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多