【问题标题】:How to configure Slow Start Duration in ansible for elb_target_group?如何在 ansible 中为 elb_target_group 配置慢启动持续时间?
【发布时间】:2020-03-24 04:12:43
【问题描述】:

如何在 ansible 的负载均衡器目标组的 AWS 控制台中配置慢启动持续时间?

我目前正在使用 ansible 的 elb 目标组模块https://docs.ansible.com/ansible/latest/modules/elb_target_group_module.html

我想设置 slow start 如下所述: https://docs.aws.amazon.com/en_en/elasticloadbalancing/latest/application/load-balancer-target-groups.html#slow-start-mode

例如:

# Create a target group with instance targets
- elb_target_group:
    name: mytargetgroup
    protocol: http
    port: 81
    vpc_id: vpc-01234567
    slow_start_duration: 30
    health_check_path: /
    successful_response_codes: "200,250-260"
    targets:
      - Id: i-01234567
        Port: 80
      - Id: i-98765432
        Port: 80
    state: present
    wait_timeout: 200
    wait: True

【问题讨论】:

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


    【解决方案1】:

    进入您的目标组,描述标签,向下滚动:编辑属性。在那里你会有慢启动持续时间

    【讨论】:

    • 是的,我可以做到,但我想用 ansible 自动做到这一点。
    • 啊,对不起。不知道。我可以共享一个 CloudFormation sn-p,但我不使用 Ansible 实现自动化。我的错。
    【解决方案2】:

    将持续时间值作为变量传递到 playbook 中,并在执行 playbook 时使用它。

    【讨论】:

    • Kanthi,你能举个例子吗?
    猜你喜欢
    • 2022-08-05
    • 1970-01-01
    • 2019-08-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-11
    • 2015-04-24
    相关资源
    最近更新 更多