[英]creating load balancer in AWS
我想創建一個新的負載均衡器並使用ansible在aws中分配一個ec2實例。 所以,我創建了new_elb.yml文件來創建新的elb,下面是我的ELB代碼:
---
#tasks:
- name: creating load balancer
#local_action:
ec2_elb_lb:
name: "apache-balancer"
state: present
zones:
- us-west-2a
- us-west-2b
listeners:
- protocol: http
load_balancer_port: 80
instance_port: 443
~
我收到如下錯誤:
ERROR! 'ec2_elb_lb' is not a valid attribute for a Play
The error appears to have been in '/etc/ansible/playbooks/final_elb.yml': line 3, column 3, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
#tasks:
- name: creating load balancer
^ here
誰能告訴我使用ansible聲明ELB和注冊ec2實例的正確方法是什么?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.